It turns out the streets of the city aren’t so mean after all — especially when compared with country life.

A new study by University of Pennsylvania researchers upends the commonly held perception that rural small towns are safer than big cities.

"Contrary to popular belief, cities do happen to be the safest place you can live," lead study author Dr. Sage Myers, a pediatrician and researcher at Penn, told NBC News.

The study shows the risk of death from an injury— including shootings, vehicle accidents, drownings, falls and many other accidents — is more than 20 percent higher in rural small towns than larger cities.

"Cars, guns and drugs are the unholy trinity causing the majority of injury deaths in the U.S.," Myers said.

The risk of homicide is what most people think of when they look at how safe big cities are, she said. But, although homicide rates are indeed higher in big cities, the risk of unintentional injury-related deaths is a full 40 percent higher in rural areas than in urban areas.

And the overall number of deaths from homicides is dwarfed by deaths from unintentional injuries.

Using a federal database built using death certificate information from across the country, the study analyzed nearly 1.3 million deaths from injuries between 1999 and 2006. It excluded terrorism-related deaths.

The three-year study found the potential of such deaths is 22 percent higher in the most rural counties compared with urban counties.

The most common causes of injury-related deaths: motor vehicle crashes. In most rural areas there were 27.61 vehicle-related deaths per 100,000 people, compared with 10.58 deaths per 100,000 people in most urban areas, according to the study.

Overall, the risk of death from a firearm was no different in a rural vs. an urban settings. Yet, for some groups of people, particularly children and people older than 45, firearm deaths were higher in rural areas.

For people age 20-44, the risk of firearm deaths was greater in big cities.

The study will be published online in the Annals of Emergency Medicine on Tuesday. The findings have implications for how emergency departments are staffed in rural areas, which tend to be underserved, according to the study's authors.

Though the study seems to go against conventional wisdom, the disparity in injury-related deaths isn't a surprise to the emergency medical community, Dr. Howard Mell, a spokesman for the American College of Emergency Physicians, told NBC News.

"At the end of the day, it's about access to care and how far you are from a trauma center," Mell said. "How fast you can get to center with trained physicians and oftentimes into the operating room."

Many rural areas, he noted, simply do not have the level of emergency medical care that can be found in major American cities.