The more humans populated a particular region, the more the foxes adapted to them.
The sight of foxes rummaging through the rubbish for scraps of food is not an unfamiliar one, and now scientists say it may have been around for thousands of years.
The diets of ancient foxes were influenced by humans, and these small carnivores might be tracers of human activity over time, according to a new study.
In the wild, foxes regularly feed on scraps left behind by larger predators such as bears and wolves. But the closer the animals live to human civilisation, the more of their diet is made up of foods that humans leave behind.
In this new study, published in the PLOS ONE journal, Chris Baumann of the University of Tubingen, Germany, and colleagues suggest that if this relationship goes back to ancient times, then foxes might be useful indicators of human impact in the past.
Researchers compared ratios of carbon and nitrogen isotopes between the remains of various herbivores, large carnivores, and red and Arctic foxes from several archaeological sites in south-west Germany dating to the Middle and Upper Palaeolithic.
At sites older than 42,000 years, when Neanderthals sparsely occupied the area, fox diets were similar to their local large carnivores.
But as Homo sapiens became common in the younger areas, foxes developed a more unique diet consisting largely of reindeer, the researchers found.
These are too big for foxes to hunt but are known to have been important game for ancient humans of the time.
These results suggest that during the Upper Palaeolithic - about 40,000 years ago, these foxes made a shift from feeding on scraps left by local large predators to eating food left behind by humans. The researchers say this indicates their reliance on human food goes back a good 42,000 years.
The authors suggest that, with further studies investigating this fox-human relationship, ancient fox diets may be useful indicators of human impact on ecosystems over time.
"Dietary reconstructions of ice-age foxes have shown that early modern humans had an influence on the local ecosystem as early as 40,000 years ago," the authors wrote. "The more humans populated a particular region, the more the foxes adapted to them."
Nina Massey is the PA science correspondent.