Despite being the best weapon against obesity, bariatric bypass surgery is no ‘magic solution’ for keeping weight off.

Now that a third of Americans are obese, doctors are working to treat the problem using a variety of methods and tools.

One such way is bariatric surgery, but new research suggests that one common form of the procedure doesn’t automatically keep the weight off.

The research, published Wednesday in the American Medical Association’s journal JAMA Surgery, examined long-term effects of laparoscopic sleeve gastrectomy.

The researchers concluded that after five years, nearly half of patients experienced significant weight gain.

Laparoscopic sleeve gastrectomy, or LSG, has become a popular weight loss surgery in the United States because it’s covered by major insurance carriers.

The procedure removes the majority of a patient’s stomach, resulting in a tube-like structure about a quarter of its original size.

Besides weight loss, the surgery has been shown to reduce a patient’s risk of diabetes, high cholesterol, and hypertension. Patients who are obese and have one of these other conditions are often candidates for LSG and other bariatric surgeries.

Prior research has shown LSGs to be effective for short-term weight loss in 90 percent of young patients. It also reduces their risk of other serious conditions by 70 percent in the first two years after their surgeries.

Other studies suggest that it’s a superior weight-loss tool to other surgeries, like laparoscopic adjustable gastric banding.

But the new research suggests that the surgery alone isn’t enough to benefit obese patients in the long run.

Read More: ‘Healthy Obesity’ Debunked »

The surgical process may be irreversible, but its protective effects aren’t necessarily permanent.

Dr. Andrei Keidar, of Beilinson Hospital in Petah Tikva, Israel, and his colleagues, examined data from 443 patients who underwent LSGs from the same surgical team, between 2006 and 2013.

Researchers found that while excess weight loss was at 77 percent after a year, it decreased to 56 percent after five years. Diabetes remission was promising at 51 percent after a year, but only 20 percent after five years.

Remission of hypertension, however, remained steady at 46 percent from the first to fifth year.

“The longer follow-up data revealed weight regain and a decrease in remission rates for type 2 diabetes mellitus and other obesity-related comorbidities,” the study authors concluded. “These data should be taken into consideration in the decision-making process for the most appropriate operation for a given obese patient.”

Read More: Obesity Is Biologically ‘Stamped In’ »

Despite the findings, Keidar says bariatric surgery is still the best currently available weapon against morbid obesity, but it shouldn’t be taken as a “panacea.”

“The first year after surgery is usually a ‘honeymoon period,’” Keidar told Healthline. “That time should be used for coining new habits.”

These habits include proper diet, regular exercise, and avoiding other unhealthy habits that may interfere with those, including smoking and excessive drinking.

Dr. Bruce Y. Lee, director of the Global Obesity Prevention Center at Johns Hopkins Bloomberg School of Public Health, says the latest study is further evidence that there is no single “magic solution” to obesity or shortcut to weight loss, “despite what advertising and some popular beliefs may suggest.”

“Bariatric surgery alone is often not effective,” he told Healthline. “Patients must also incorporate substantial lifestyle and behavior changes along with the surgery to achieve sustainable weight loss.”

Knowing this, responsible surgeons must make sure surgery candidates are also willing and able to make the necessary dietary and physical activity changes before agreeing to operate on them, said Lee, who was not part of the new research.

“If the patient cannot maintain these behavioral changes, then the weight will frequently come back,” he said. “While bariatric surgery can be helpful for people who have tried and exhausted all other options, we must realize that such surgery is no replacement for changing the systems that lead to obesity.”

Read More: Doctors Finally Beginning to Treat Obesity »