Atheists and agnostics are more driven by compassion to help others than are highly religious people, a new study finds.

That doesn't mean highly religious people don't give, according to the research to be published in the July 2012 issue of the journal Social Psychological and Personality Science. But compassion seems to drive religious people's charitable feelings less than it other groups.

"Overall, we find that for less religious people, the strength of their emotional connection to another person is critical to whether they will help that person or not," study co-author and University of California, Berkeley social psychologist Robb Willer said in a statement. "The more religious, on the other hand, may ground their generosity less in emotion, and more in other factors such as doctrine, a communal identity, or reputational concerns."

Willer's co-author Laura Saslow, now a postdoctoral scholar at the University of California, San Francisco, became interested in the question of what motivates charity after a non-religious friend lamented that he donated money to earthquake recovery in Haiti only after seeing a heart-touching video of a woman being pulled from rubble, not because of a logical understanding that help was needed.

"I was interested to find that this experience – an atheist being strongly influenced by his emotions to show generosity to strangers – was replicated in three large, systematic studies," Saslow said in a statement.

In the first study, Saslow and her colleagues analyzed data from a national survey of more than 1,300 American adults taken in 2004. They found that compassionate attitudes were linked with how many generous behaviors a person was likely to report. But this link was strongest in people who were atheists or only slightly religious, compared with people who were more strongly religious. [8 Ways Religion Impacts Your Life]

In a second experiment, 101 adults were shown either a neutral video or an emotional video about children in poverty. They were then given 10 fake dollars and told they could give as much as they liked to a stranger. Those who were less religious gave more when they saw the emotional video first.

"The compassion-inducing video had a big effect on their generosity," Willer said. "But it did not significantly change the generosity of more religious participants."

Finally, a sample of more than 200 college students reported their current level of compassion and then played economic games in which they were given money to share or withhold from a stranger. Those who were the least religious but most momentarily compassionate shared the most.

More research will be needed to understand what factors motivate religious people's giving, but the study makes clear that empathy and compassion are not the only factors at play.

"Overall, this research suggests that although less religious people tend to be less trusted in the U.S., when feeling compassionate, they may actually be more inclined to help their fellow citizens than more religious people," Willer said.

Follow LiveScience for the latest in science news and discoveries on Twitter @livescience and on Facebook.