CLEVELAND --Omnicare will pay $50 million to settle allegations that it improperly dispensed drugs for nursing home patients without a doctor's signed prescription since 2007, the government announced Friday.

U.S. Attorney Steven Dettelbach said at a news conference that it was the second largest monetary settlement nationally in the history of the Controlled Substances Act regulating drugs.

The Covington, Ky.-based company, which sells drugs to long-term care providers like hospitals and nursing homes, said there were no allegations that drugs were illegally diverted to someone without prescriptions and no patients were harmed. The charges stemmed from a previously announced investigation by the Drug Enforcement Administration.

Omnicare has ten pharmacies in Ohio, including Eastlake, Wadsworth and Dover, that service about four hundred facilities.

At issue was how pharmacy managers communicate with doctors who write prescriptions for controlled substances. The civil penalty resolves government claims that Omnicare improperly dispensed addictive painkillers and other drugs to patients at nursing homes and other health-care facilities it serves, sometimes dispensing without prescriptions.

Even with a prescription, the medication order sometimes omitted the drug name, dose, strength and quantity, the government said.

Asked about the motive, Dettelbach said the case was a civil matter, not criminal, and added, "There is a lot of profit that happens with the dispensation of high volumes of these medicines."

Dettelbach said the case was meant to send a message.

"Doctors need to be involved in the key care decisions regarding patients involving providing these controlled substances," he said.

Omnicare said that the settlement with the Justice Department recognizes that whoever prescribes a drug must either sign an order containing all of the elements of the prescription or, in emergency situations, speak directly to the pharmacy.

Omnicare said that pharmacies in long-term care facilities have historically operated in a less defined "middle ground." Sometimes they dispensed drugs on the instruction of staff at the facility.

"We believe this settlement provides long-term care pharmacies, long-term care facilities and prescribers with clear direction regarding the procedures that must be followed when dispensing controlled substances," Omnicare CEO John Figueroa said.