It's already known that obesity surgery can help people shed pounds and better control health conditions like diabetes and high blood pressure.

But it has not been clear whether that translates into fewer heart attacks and strokes down the road.

Researchers said the new findings suggest the answer is "yes."

The study team found that severely obese patients who had the surgery were 40 percent less likely to suffer a heart attack or stroke over five years, versus those on standard diabetes care.

Those who had the surgery were also two-thirds less likely to die during the study period, according to the report published Oct. 16 in the Journal of the American Medical Association.

"If we had a pill that could do that, we'd all be prescribing it," said study co-author Dr. David Arterburn.

For most people, medication, diet and exercise are the cornerstones of managing type 2 diabetes. But for people with severe obesity, that might not be enough, said Arterburn, a senior investigator with Kaiser Permanente Washington Health Research Institute, in Seattle.

He said he hopes the new findings prompt more doctors and patients to discuss surgery as an option.

That said, the study was not a clinical trial that directly tested obesity surgery against standard diabetes care. It was an "observational" study where the researchers compared the medical records of people who underwent obesity surgery, and similar patients who stuck with standard care.

Those types of studies do not prove cause-and-effect, Arterburn explained.

Still, the new findings offer the "best available evidence" that obesity surgery can ultimately prevent heart attacks and strokes, he said.

According to the U.S. National Institutes of Health (NIH), obesity surgery may be an option for people with a body mass index (BMI) of 40 or higher -- about 100 pounds or more overweight.

People with less-severe obesity (a BMI of at least 35) may be candidates if they have conditions such as diabetes or sleep apnea.

There are downsides to the treatment. On average, the NIH says, surgery costs between $15,000 and $25,000, depending on the type of procedure. There are surgical risks, including bleeding and infection. And in the longer term, the side effects include nutritional deficiencies, hernias and ulcers.

But, he added, those things have to be weighed against the potential benefits.

To study the longer-term outlook, Arterburn's team examined records from about 5,300 patients with type 2 diabetes who underwent obesity surgery. They were compared with similar patients who used oral medication, and sometimes insulin, to manage their diabetes.

Over five years, just over 4 percent of the medication group had suffered a heart attack or stroke. That rate was halved, at about 2 percent, in the surgery group.

The researchers weighed other factors -- including patients' age, race and whether they had uncontrolled high blood pressure. And obesity surgery was still linked to a 40 percent lower risk of cardiovascular complications.

Surgery patients were also less likely to die during the study period: After five years, just over 1 percent had died, versus 4.5 percent in the comparison group, the findings showed.