Washington (CNN) -- The pharmaceutical company that makes the prescription pain medications Darvon and Darvocet has agreed to withdraw the drugs from the U.S. market at the request of the U.S. Food and Drug Administration, the FDA said Friday.

The FDA says the drug, propoxyphene, puts patients at risk of potentially serious or fatal heart rhythm abnormalities. Since 2009, 10 million people have been prescribed some form of the drug.

"We recommend to physicians stop prescribing the drugs. As for patients, do not stop taking it, but we urge you to contact your health care professional. Do not delay," said Gerald Dal Pan, director of the FDA's Office of Surveillance and Epidemiology.

Xanodyne Pharmaceuticals Inc. manufactures Darvon and Darvocet, two brand name versions of propoxyphene. The FDA also asked generic makers of the pain medicine to voluntarily remove their products.

The decision to remove the drug came after the FDA reviewed a new trial study that looked at the drug's impact on heart rhythms.

"The drug's effectiveness in reducing pain is no longer enough to outweigh the drug's serious potential heart risks," the FDA said in a statement released Friday.

Propoxyphene, first approved by the FDA in 1957, is an opioid used to treat mild to moderate pain. It is sold under various names both alone, such as Darvon, or in combination with acetaminophen, such as Darvocet.

Since 1978, the FDA has received two requests to remove propoxyphene from the market, but concluded that the benefits of propoxyphene for pain relief at recommended doses outweighed the safety risks.

CNN's Val Willingham contributed to this report.