A similar observational study last year that compared 5,301 obese patients with Type 2 diabetes who had bariatric surgery with 14,934 patients who served as controls also found improved outcomes in patients who underwent the operation.

Both Dr. Nathan and Dr. Livingston said the comparisons between patients who had surgery and those who did not were flawed, because people who elect to undergo weight-loss surgery are in many ways different from those who do not. Surgical patients are highly motivated, for instance, and healthy enough that surgeons do not turn them away.

The results of the study of weight-loss surgery — known as bariatric surgery and sometimes as metabolic surgery — were presented on Monday at the European Society of Cardiology Congress in Paris. The study, carried out at the Cleveland Clinic, was partly funded by Medtronic, a company that makes medical equipment used in weight-loss surgery.

The researchers first combed through electronic medical records to identify 2,287 patients with obesity and Type 2 diabetes who had undergone one of four types of weight-loss surgery at the Cleveland Clinic. The majority of patients had undergone gastric bypass or sleeve gastrectomy, while a smaller number had adjustable gastric banding or a duodenal switch procedure.

The scientists then identified 11,435 control patients with obesity and diabetes for comparison — five times the number of surgery patients. Although the researchers made an effort to match the control patients closely to the surgery patients, there were differences between the groups.

The members of the control group were slightly older and had double the smoking rates of the surgery group; the surgery patients were slightly heavier to begin with, and had higher rates of high blood pressure and high cholesterol.

The main question the scientists sought to answer was whether those who had surgery were less likely to experience death or one of five major complications associated with obesity and diabetes: coronary artery events (like heart attacks), cerebrovascular events (like strokes), heart failure, atrial fibrillation or kidney disease.