Numbers of the once common hedgehog have declined dramatically from an estimated 36.5 million in the 1950s to fewer than one million left in the UK today.
The ripping out of hedgerows, intensive agriculture and the use of pesticides and creeping urbanisation have been blamed for their disappearance from the countryside.
New research has shown urban hedgerows are clinging on in gardens and parks which they have now made their home - and they outnumber their rural cousins.
But to survive they have changed their habits sheltering in gardens and parks during the day and only venturing out at night when dogs and people turn in for bed.
Their range to find food and a mate is also smaller than in the country.
Despite an abundance of food from leftover takeaways, bird feed and pet food all year round they hibernate for the same length of time.
Postdoctoral fellow Dr Lisa Warnecke at the University of Hamburg fitted hedgehogs with temperature-sensitive transmitters to investigate what physiological factors allow them to thrive in urban areas.
Dr Warnecke said: “These specialised transmitters allowed us to monitor hibernation patterns and nest site use in winter, as well as activity and home range size in summer.”
The researcher who studies hibernation ecology and thermal energetics of the European hedgehog in urban environments used hedgehogs living near major, busy roads and small, quiet side streets.
She said: “We found that urban hedgehogs had much smaller nightly ranging areas than their rural counterparts - five hectares versus 50 - and that they adjusted their activity to levels of human disturbance.”
Surprisingly she found similar hibernation patterns.
Dr Warnecke said: “We were surprised to find that city hedgehogs showed hibernation patterns very similar to rural or captive populations in terms of the depth of torpor, the frequency with which they rewarmed and the overall duration of their hibernation.
“This was despite city hedgehogs often nesting next to busy roads and having potential food sources available throughout winter - such as food scraps or cat food on private terraces
“Gardens and public parks are very important for city hedgehogs.
“They need gardens with natural vegetation and public parks less immaculately pruned, with plenty of natural, bushy areas.”
And she urged gardeners to think about their garden visitors adding: “Our work with the hedgehog care station showed the main problems were injuries caused by fences, plant netting or gardening tools, and sickness from ingesting rat poison.”
The findings were presented at the Society for Experimental Biology Annual Meeting 2016 in Brighton.