(Reuters) - The U.S. Food and Drug Administration on Friday warned that a widely used newer class of type 2 diabetes drugs sold by AstraZeneca, Johnson & Johnson and Eli Lilly in partnership with Boehringer Ingleheim may cause dangerously high levels of blood acids that could require hospitalization.

The oral drugs belong to a class known as SGLT2 inhibitors that work by causing blood sugar to be secreted in the urine. They include AstraZeneca's Farxiga (dapagliflozin), J&J's Invokana (canagliflozin) and Jardiance (embagliflozin) from Lilly and Boehringer.

The FDA, in a warning on its website, said the medicines may lead to ketoacidosis, a serious condition where the body produces high levels of blood acids called ketones.

The FDA said its Adverse Event Reporting System database identified 20 cases of acidosis reported as diabetic ketoacidosis, ketoacidosis, or ketosis in patients treated with SGLT2 inhibitors between March 2013 to June 6, 2014. It said all the affected patients required emergency room visits or hospitalization to treat the condition.

Since June 2014, the agency said it had continued to receive additional adverse event reports of diabetic ketoacidosis and ketoacidosis in patients treated with SGLT2 inhibitors.

The FDA warning also listed three combination type 2 diabetes treatments that include an SGLT2 drug as one of its two components, J&J's Invokamet, Xigduo XR from AstraZeneca and Lilly and Boehringer's Glyxambi.

The medicines became popular in part because in addition to controlling blood sugar levels, they led to modest weight loss and slightly lower blood pressure. Obesity is a leading cause of type 2 diabetes and some older treatments cause weight gain.

But the new FDA warning could help boost sales of alternative medicines, such as Merck & Co's Januvia.

"Inasmuch as there will be heightened awareness of this new safety issue with the SGLT2s, it could benefit other oral diabetes drug classes such as the DPP4 inhibitors," Bernstein analyst Tim Anderson said in a research note. "The biggest of the DPP4s, by a wide margin, is Merck's Januvia."

Januvia, which had sales of about $6 billion in 2014, is Merck's top-selling product.

A series of heart safety studies, for which data recently became available, appears to have absolved the DPP4 class of concerns that had been constraining their sales.

(Reporting by Bill Berkrot; Editing by Jeffrey Benkoe and James Dalgleish)