New research offers evidence for a claim made regularly by country music singers: Growing up with a little dirt under his nails may make a country boy a little shy. But compared to a born-and-bred city slicker, that country boy will grow up to be a stronger, healthier and more laid-back man.

In ways large and small, farm kids and city kids grow up worlds apart from each other. A study published this week in the Proceedings of the National Academy of Sciences explores the possible consequences of that divergence for the health of modern men.

German researchers recruited men under 40 whose childhoods fit one of two starkly different patterns. Either they had spent the years before they turned 15 in a city of more than 100,000 people and had never had a pet in their childhood home. Or, they spent those years on a farm that raised livestock.

The researchers laid before these healthy young men the kind of wide-ranging social challenge sure to induce a potent case of sweaty palms: giving a job talk on short notice, answering to a jury of white-coated judges, and performing a mind-bending arithmetic feat under time pressure.

Then, the researchers compared the two groups' reactions using a battery of physiological and psychological tests.

In their responses to questionnaires as well as in measures of acute physical stress, the study's 20 country boys clearly felt the heat of the social challenge more strongly. Their levels of cortisol - a "fight or flight" hormone - spiked higher, and they reported higher levels of anxiety.

But the young men who had grown up petless in big cities showed a more sustained immune response to the social challenge.

The immune systems of both groups rushed to release chemicals consistent with a strong defense against a perceived enemy. But while this response in the country boys waned after five minutes, the city boys' immune systems stayed on high alert for at least two hours. And the urbanites were less able to tamp down their stress-related inflammatory response with the release of anti-inflammatory chemicals.

The finding strengthens the suspicion that growing up in sanitized urban environments is making many of us more fragile when it comes to warding off certain diseases.

Called the "hygiene theory," the idea is that early exposure to dirt, and to animals who maintain their link to the earth's microbial fecundity, trains our developing immune systems to handle stressors large and small and tamps down the immune system's occasional penchant for overreaction.

The hygiene theory is often held up as an explanation for the dramatic uptick in the incidence of childhood auto-immune diseases such as asthma, allergies, Type 1 diabetes and rheumatoid arthritis. And it's often cited as a contributor in diseases that involve unchecked inflammation, including cardiovascular disease, some cancers and such common mental health disorders as depression.

For those raised in areas offering what the authors called "a narrow range of microbial exposures," the new study points to "possible biological mechanisms underlying increased risk for inflammatory diseases, as well as increased vulnerability to mental health disorders where inappropriate inflammation is thought to be a risk factor," they wrote. The authors noted recent Danish research suggesting that rates of autism, schizophrenia and bipolar disorder were higher among urbanites, and other research suggesting that depression, anxiety and mood disorders were more common among city dwellers.

The study was very small, with only 20 young men in each group. But the researchers found the two groups well matched on a wide range of socioeconomic background factors and childhood stressors, as well as in their past and present states of mental and physical health. There was this difference, however: compared to urban participants, significantly more of the subjects who had grown up in rural areas had regular contact with pets and/or farm animals during adulthood.

You might conclude that urban parents who want to give their kids the laid-back country attitude and robust immune system that comes with growing up on a farm should be sure to provide their children a pet.

This study doesn't really shed light on that surmise. But here's an intriguing tidbit from a 2001 study carried out at the University of Zagreb: Young adults who had a pet as a child were more empathetic, more prone to choosing helping professions, and "more oriented toward social values" than were young adults who'd grown up without pets.

Melissa Healy is a health and science reporter with the Los Angeles Times writing from the Washington, D.C., area. She covers prescription drugs, obesity, nutrition and exercise, and neuroscience, mental health and human behavior. She's been at The Times for more than 30 years, and has covered national security, environment, domestic social policy, Congress and the White House. As a baby boomer, she keenly follows trends in midlife weight gain, memory loss and the health benefits of red wine.