Owning a dog could lengthen your life, according to a new study.

Researchers studying cardiovascular disease came to the conclusion after examining data from 3.4 million Swedes aged between 40 and 80.

Everything from registering a dog to visiting a hospital requires presentation of a unique identification number in Sweden, so the team from Uppsala University were able to access an anonymised set of data from national registries.

As a result, they were able to study whether having a registered dog was associated with cardiovascular disease and death in people with no history of the illness, over a 12-year period.

They found that dog owners had a lower risk of death due to cardiovascular disease or other causes.

“I met another scientist who had a stroke six months previously, and he told me ‘it was my dog that saved me’,” said Professor Tove Fall, a veterinarian at who co-authored the research, which was published in the Scientific Reports journal.

“Stroke rehabilitation is important and for this man, his motivation to get out of bed was walking his dog. So I think on an individual level it can have huge effects, but it was also interesting to see we could measure it in the whole population.”

While the study does not speculate on why the creatures might be better for life longevity, Professor Fall suggested that “there could be direct effects of having a dog, such as more motivation for physical activity”.

The dogs from Instagram Show all 6 1 /6 The dogs from Instagram The dogs from Instagram Noodle the Dachshund is just over a year old and comes with her own hashtag (#OodlesOfNoodle) The dogs from Instagram Three-year-old Staffie Ramsey was malnourished when he was adopted as a puppy but is now big and boisterous with ripped muscles and a cheeky grin The dogs from Instagram Winny the Welsh Corgi has been credited with the breed's upsurge in popularity The dogs from Instagram Bruno the miniature Dachshund has 66,700 followers The dogs from Instagram Mika the Husky has 58,900 followers The dogs from Instagram Elle the French Bulldog has 8,868 followers

She added: “There might also be very important effects of social support you get, from your dog and meeting people through your dog.”

The scientists also speculate there could be a link with the microbiome. The dirt and germs that come naturally with a dog might boost its owner’s immune system.

This is something Professor Fall said she intends to investigate in a future study.

However, dogs themselves might not be bringing about positive health effects, said Dr John Bradshaw, a pet researcher at the University of Bristol who was not involved in the study.

Instead, dog owners may just be healthier to begin with.

“There are major differences between people who choose to get dogs and people who don’t,” said Dr Bradshaw.

Professor Fall acknowledged this, noting that those with the motivation to look after and register a dog might similarly be more motivated to look after themselves and visit the doctor.

While some previous studies have shown similar positive effects for pet ownership generally, others have shown the opposite effect.