The powerful painkiller codeine is often prescribed to children in emergency rooms despite warnings and the availability of alternatives, researchers at the University of California, San Francisco (UCSF) indicated.

"Despite strong evidence against the use of codeine in children, the drug continues to be prescribed to large numbers of them each year," lead author Dr. Sunitha Kaiser, assistant clinical professor of pediatrics at UCSF Benioff Children's Hospital San Francisco, said in a press release. "It can be prescribed in any clinical setting, so it is important to decrease codeine prescription to children in other settings such as clinics and hospitals, in addition to emergency rooms."

Codeine is an opioid used to treat mild to moderate pain and suppress cough. Its use is controversial because children respond to it in different ways depending on how fast they metabolize it. About one-third don't experience any symptom relief, while up to one in 12 can accumulate toxic amounts, causing breathing to slow down and possible death.

The American Academy of Pediatrics finds emergency room doctors prescribe codeine to children more than 500,000 times per year.

As the 10-year study published in the journal Pediatrics notes, just 3 percent of kids' emergency visits resulted in a codeine prescription in 2010. But with more than 25 million emergency room visits by children each year, the authors say far too many kids are getting the drug when better options are available, like ibuprofen or hydrocodone.

Kaiser and her colleagues used the National Hospital and Ambulatory Medical Care Survey to determine how frequently doctors prescribe codeine to children ages 3-17 during U.S. emergency room visits.

The rates of codeine prescriptions decreased from 3.7 percent to 2.9 percent during the 10-year period. However, 559,000 to 877,000 prescriptions were still being given to children each year.

Some professionals were stunned by the results.

"I've never seen a doctor write codeine as a cough suppressant or as a painkiller in an emergency room," Dr. Dyan Hes, medical director at Gramercy Pediatrics in New York, said on "CBS This Morning." " I worked in many hospitals; I've never seen it happen."