"The findings give us a glimpse into what is the nature of morality," said Dr Marco Iacoboni, director of the Neuromodulation Lab at UCLA's Ahmanson-Lovelace Brain Mapping Center.

During moral dilemmas, humans do whatever they think is right, it's hard to explain.

Say, you're in a war zone; you and your fellow soldiers are hiding from the enemies and a baby starts crying all of a sudden. To save others will you harm the child - maybe by covering her mouth so that it doesn't draw the attention of the opponents who will kill everyone, or smother the child? It's hard to say, right?

Well, not anymore. Results of a recent study suggest that they could actually guess what would your decision be based on how your brain responds when you watch someone else experience pain.

The study by researchers at University of California - Los Angeles found that responses from such tests can predict whether he/she will be inclined to causing harm to others or avoid it when facing moral dilemmas.

"The findings give us a glimpse into what is the nature of morality," said Dr Marco Iacoboni, director of the Neuromodulation Lab at UCLA's Ahmanson-Lovelace Brain Mapping Center and the study's senior author. "This is a foundational question to understand ourselves, and to understand how the brain shapes our own nature."

Researchers studied the response of 19 volunteers who were shown two videos -- a hypodermic needle piercing a hand, and another of a hand being gently touched by a cotton swab.

The scientists used a functional MRI machine to measure activity in the volunteers' brains when they saw those videos.

They analysed mirror neurons -- brain cells that respond equally when someone performs an action or watches someone else perform the same action. The mirror neurons also play a vital role in empathy.

During the study, the researchers also asked the study participants various questions related to a variety of moral dilemma scenarios involving the crying baby during wartime.

The other scenarios included: the prospect of torturing another person to prevent a bomb from killing several people and whether one would harm research animals in order to cure AIDS.

The scientists hypothesised that people who had greater neural resonance while watching the hand-piercing video would also be less likely to choose to silence the baby in the hypothetical dilemma, and it proved to be true.

Indeed, they found that people with stronger activity in the inferior frontal cortex — the part of the brain essential for empathy and imitation, were less likely to cause direct harm to others.

But, no correlation between people's brain activity and their willingness to do hypothetically harm to others for the greater good was found by the researchers. They believe that those decisions stem from more cognitive, deliberative processes.

"It would be fascinating to see if we can use brain stimulation to change complex moral decisions through impacting the amount of concern people experience for others' pain," Iacoboni said. "It could provide a new method for increasing concern for others' well-being."