A simple genetic test can enable people to find out the exact origins of their family within a few miles, according to researchers.
The results have raised the possibility that people, who live in cities but have roots in rural communities elsewhere in the same country, could locate exactly where their ancestors came from.
In earlier studies, researchers have uncovered genetic differences between populations in different countries, which, for example, could predict whether someone is of northern or southern Italian descent.
Led by Jim Wilson, the researchers studied the genes of people whose four grandparents came from the same village in Scotland, Croatia or Italy.
None of the volunteers were related to each other.
The results showed that by studying genetic differences, they could distinguish between individuals who live in villages that are only five miles apart.
Researchers predicted the correct village of origin for everyone involved in the Italian study, 96 per cent of the Scottish sample and 89 per cent of people in the Croatian sample.
They concluded that the pattern could be explained by the fact that, long ago, people tended to marry within their own community.
After many generations, the different villages developed their own genetic fingerprint, which can now be picked up by scientists.
"It was quite surprising and quite exciting because we've known for a number of years that you can use the variation that people have in their DNA to tell whether they're African or East Asian or Native American - people who come from different continents," the Telegraph quoted Wilson as saying.
"I just wanted to see what the limit of this was, how far can you go. We had samples from villages very close together. We were able to ask whether you can tell people apart from basically next door," he added.
The study is featured in the European Journal of Human Genetics.