(IANS) Researchers discovered that such people are more likely to have a genetic variant that protects them from tuberculosis and leprosy.
They analysed DNA samples from populations across Europe, Asia and Africa and compared rates of genetic disease resistance with urban history.
Poor sanitation and heavy population densities provided an ideal breeding ground for infections in built-up areas in previous generations, reports the journal Evolution.
Past exposure to pathogens led to disease resistance spreading through populations because ancestors passed it on to their descendants, a Daily Mail report quoting scientists, said.
Ian Barnes from the School of Biological Sciences at the University of London's Royal Holloway College, who conducted the study, said: "This seems to be an elegant example of evolution in action."
"It could also help to explain some of the differences we observe in disease resistance around the world."
They found that in the areas with a long history of urban settlements, today's inhabitants were more likely to possess the DNA variant which provides some resistance to infection.