Selflessness and civic-mindedness can be inherited, especially if you are a woman, according to a new study.
Niceness, in other words, may be in your genes.
The study, published Wednesday in Biology Letters, adds to a growing body of research suggesting that the drivers of human behaviour are found, more than previously suspected, in "nature" rather than "nurture."
Environmental influences such as parenting and schooling remain strong, the scientists agree.
But our genetic endowment -- along with the way genes are activated or expressed -- is increasingly seen as shaping who we are and what we do.
Seeking to tease apart these factors, University of Edinburgh scientists Gary Lewis and Timothy Bates looked at self-assessments of nearly 1,000 pairs of twins in the United States to see how "pro-social" they were.
Some of the twins were identical and the others were fraternal.
"Having identical and non-identical twins allows you to understand whether there is a genetic factor at play," Lewis explained by phone.
"Identical twins, which share 100 percent of their genes, are more similar than non-identical twins, who share only 50 percent. You can infer genetic influence because of that biological fact."
Previous research, notably with infants too young to have been fully socialised, already suggested humans have an inbuilt capacity for empathy.
In their twins study, Lewis and Bates broke down that impulse in adults into three "pro-social" areas: a sense of civic duty, job commitment and concern for the welfare for others.
On the last of these, for example, the twins were asked, on a scale of one to 10, how much compulsion they felt to pay more so that everyone, including the poor, could have access to medical care.
Those who felt the greatest impulse for generosity were identical female twins.
"This suggests that genetic effects are influential with regards to pro-social behaviour," Lewis said.
If the results had been the same for both identical and non-identical groups, it would have indicated that environmental factors were dominant.
The difference was much less pronounced among men, the study found.
Lewis said that it was too early to speculate as to which genes might be involved in boosting "niceness," and other scientists urged caution on how to interpret the findings.
"Heritability pertains to the entirety of the genome, not to a single gene," said Steven Pinker, a well-known evolutionary psychologist at Harvard University.
Height, he pointed out in an email exchange, is highly heritable.
But at last count there were dozens of genes -- and there may be hundreds or even thousands -- each affecting height by a small amount.
"For all we know the same may be true for niceness, even if it does turn out to be heritable," he said.
Attitudes and abilities -- a good memory, religious fervour, ethnocentrism, to name a few -- once attributed exclusively to the shaping influence of society are now thought by many geneticists to harbour origins deep inside our DNA.
At least two burgeoning fields of research have emerged to study the power of genes to sculpt behaviour, said Lewis.
Evolutionary psychologists tend to focus on traits presumed to be shared by all human beings, such as maternal instincts or sexual jealousy. Behavioural geneticists look more at traits that vary widely, such as personality, intelligence, or mental illness.
Explore further: How learning to talk is in the genes