Men taking Viagra for erectile dysfunction could be saving themselves from an early death, according to the results of a recently published observational study.

Funded by the pharmaceutical company Sanofi, the investigation looked back at 14 years' worth of medical records on more than 23,000 American men who had been prescribed a phosphodiesterase type 5 inhibitor (PDE-5i), such as the common erectile dysfunction medication Viagra.

An analysis compared health details with those in the records of 48,000 men who received no comparable prescription.

Since Sanofi sells their own PDE-5i called avanafil (commercially known as Stendra), the results aren't exactly free of conflicting interests. But that doesn't mean they should be dismissed out of hand, either.

The men in the study who had been taking a PDE-5i were found to be 39 percent less likely to die from cardiovascular disease than those who had no record of a prescription. They were also 25 percent less likely to die from any cause, and 13 percent less likely to have a cardiac event, such as a heart attack or stroke.

The men who took a higher cumulative dose of a PDE-5i were better protected against heart disease than the men who took a lower dose.

The study controlled for age, medications, disease history, and smoking status. However, being a simple retrospective look at a population already taking the drug, the study could not show causation.

Men who choose to take medications like Viagra could just happen to be healthier to begin with. Or their ability to engage in sexual activity following treatment might have caused the benefits to cardiac health seen in the study, as opposed to a more direct influence of the drug, the researchers said.

Nevertheless, the study hints at the potential positive impact of PDE-5i on heart health in the general male population.

"Phosphodiesterase type 5 inhibitors are not only safe but may have important cardioprotective properties," the researchers said. "[These findings] suggest an urgent need for an adequately powered, prospective randomized placebo-controlled trial."

Cardiologist Deepak Bhatt, the director of Mount Sinai Heart in New York, said the study was interesting but "a randomized clinical trial in which many patients with cardiovascular disease were randomly given either Viagra or a placebo (a 'blank') would be necessary to know whether there are any real cardiovascular benefits to the drug".

"While it is possible that Viagra may have some cardiovascular benefits, that would require further investigation, and this current study does not prove it," he told ScienceAlert.

"Rather, it is more likely that the patients in this study who were placed on Viagra by their doctors were less likely to have heart disease, because if patients have severe heart disease, they are often not placed on Viagra in the first place," he said.

"The study is observational so it will not have the impact that a clinical trial would have," Nial Wheate, a pharmaceutical chemist at the University of Sydney in Australia, told ScienceAlert.

Viagra was also shown to be an effective treatment for pulmonary arterial hypertension and was approved by the FDA for this indication in 2005 under the brand name Revatio. (In people with this condition, the arteries between the heart and the lungs become blocked, increasing the blood pressure and putting more strain on the right side of the heart.)

"We've known about the cardiovascular benefits of these types of drugs for quite some time," said Wheate. "The fact that it has benefits to do with your heart is not at all surprising. Good, but not surprising."

Pharmaceutical companies often fund studies "at arm's length", such as Sanofi's involvement in this instance, said Professor Wheate. "I'm confident the results are real," he said.

The next step would be to conduct a large clinical trial in a controlled environment to confirm the result, he said.

This study was published in the Journal of Sexual Medicine.