WASHINGTON -- U.S. health regulators are telling five drugmakers to recall their versions of a widely used diabetes medication after laboratory tests found elevated levels of a contaminant linked to cancer.

The Food and Drug Administration said late Thursday that several batches of the drug metformin tested positive for unsafe levels of a chemical called N-Nitrosodimethylamine. The agency has stepped up testing after the chemical was found in dozens of shipments of heartburn drugs last year, triggering recalls of Zantac and other popular over-the-counter and prescription medications.

Metformin tablets are a staple of diabetes care, reducing excess sugar in the blood. People with Type 2 diabetes use metformin alone or with other drugs to help control their blood sugar levels. More than 34 million people in the U.S. have this disease.

Patients should continue taking metformin drugs until their doctor can prescribe a replacement, the FDA said in a statement, noting the risks of discontinuing. Regulators are still assessing whether the recalls will lead to shortages of metformin, but noted that a number of other companies make generic versions of the drugs that don't appear to be affected by the issue.

Drugmaker Apotex Corp. recalled its extended-release metformin distributed in the U.S. earlier this week after the FDA found contamination in one lot. Apotex said in a statement it recalled all supplies of the drug "out of an abundance of caution." The company said it stopped selling the drug in the U.S. in February 2019 and that little remains on the market.

The FDA announcement did not name the four other drugmakers who have been requested to recall their products.

In a statement, Health Canada said it "continues to hold manufacturers responsible for maintaining the safety of all drugs marketed in Canada," but did not answer questions Friday about how the FDA action might impact the Canadian supply.

"If at any point Health Canada identifies a new health risk to Canadians, the department will take action as needed and inform Canadians," the agency said in an email.

Earlier this year three brands collectively recalled dozens of lots of metformin in Canada due to concerns of "nitrosamine impurities." That included Apotex Corp.'s extended release metformin as well as products from Ranbaxy Pharmaceuticals Canada Inc. and JAMP Pharma Corporation.

The FDA noted that no contamination problems have been found in immediate-release metformin.

The agency is responsible for ensuring that medicines for the U.S. market are made in safe, sanitary conditions that meet federal quality standards. But government inspectors have repeatedly criticized the agency for falling short in reviewing overseas manufacturing plants as the pharmaceutical supply chain has increasingly spread to Asia.

In March, the FDA suspended nearly all U.S. and foreign inspections due to safety concerns and travel restrictions caused by the coronavirus outbreak.