Scientists have uncovered a genetic difference in people who show greater compassion for animals.

The difference lies in a gene that produces the hormone oxytocin – commonly known as the love hormone – which is known to boost social bonding between people.

It is the first time the hormone has been linked to relationships between people and animals, researchers said, as they voiced hope the findings could help with the development of strategies to help improve animal welfare.

Experts at the University of Edinburgh’s Roslin Institute and Scotland’s Rural College (SRUC) analysed DNA from 161 student volunteers.

They were also asked to complete a questionnaire to gauge their empathy towards animals.

The team found those who showed the greatest compassion for animals had a specific version of the oxytocin gene.

They also found women responded more positively towards animals than men, as did those working in a profession linked to animal care.

People’s attitudes towards animals are known to be influenced by a variety of social factors, such as early life experiences, personality traits and religious beliefs, researchers said.

According to the team, this is the first time scientists have shown that genetics may also play a role.

Dr Sarah Brown, from the Roslin Institute, said: “We already knew that oxytocin was important for empathy between people but now we know it helps us bond with animals too.”

Professor Alistair Lawrence, from the university and the SRUC, said: “This research is only the beginning but we hope that these findings could help us to devise strategies to help improve animal welfare across the UK.”

The study has been published in the journal Animals.