LOS ANGELES - Anna Nicole Smith's doctor was feeding her addiction to prescription medications by excessively prescribing opiates, including a drug nicknamed "hospital heroin," a pain management expert testified Tuesday.

Dr. James Gagne said Dr. Sandeep Kapoor had no legitimate medical reason for giving the Playboy model multiple prescriptions for Dilaudid, methadone and sedatives known as benzodiazopines.

Gagne testified at a preliminary hearing to determine whether Kapoor and two other defendants should stand trial on charges that they illegally funneled drugs to Smith. All have pleaded not guilty. Smith died of an accidental overdose of at least nine medications at a Florida hotel in February 2007.

Gagne said Kapoor began treating Smith when he took over the practice of another doctor in April, 2004. Kapoor took up the same regimen as his predecessor, who was treating Smith for pain but felt she "had a predominantly psychiatric illness and was trying to keep a lid on it with methadone," Gagne said.

When Smith fell and fractured two ribs, "Dr. Kapoor prescribed large amounts of Dilaudid, the strongest opiate available," said Gagne, noting the drug is prized by addicts as "hospital heroin."

"Dilaudid is a highly abused drug," he said. "It can cause people to stop breathing."

Smith had requested Dilaudid before and failed to get it, Gagne said.

On cross-examination by Kapoor's lawyer, Ellyn Garofalo, Gagne conceded that rib fractures can be painful. But when asked about reports that Smith was bedridden and Kapoor had to pay a house visit to treat her for the injury, Gagne was unmoved.

"My reaction is to say there's something else going on," he said. "A rib fracture is not that serious an injury. If somebody is bed-bound because of the pain there's something else going on."

Garofalo suggested Kapoor was treating her properly for the extreme pain she reported.

"Is it your position that Anna Nicole Smith should not have been treated with opiates?" asked the attorney.

"No," said the witness.

"You just believe the dose was too high?" asked Garofalo.

"Yes," said Gagne.

By the end of September, Kapoor wrote that he was "tapering off" Smith's Dilaudid, but the dosages he prescribed actually increased, Gagne testified. Kapoor stopped the drug by the end of the year, possibly as the result of an appearance by Smith on the American Music Awards, where she appeared to be intoxicated, Gagne said.

Smith's boyfriend, Larry Birkhead, previously testified that Smith had seizures the night before the show and was on anti-seizure medication.

Under questioning by Deputy District Attorney Sean Carney, Gagne said Smith's behaviour on the show should have alerted Kapoor that she was an addict who was abusing drugs.

"It was an enormous red flag with sound effects," he said. "Here we have someone appearing in a public place grossly intoxicated. Prescribing opiates to such a person is feeding the addiction, not treating the underlying pain."

Kapoor eventually had a 45-minute meeting with Smith and her boyfriend-lawyer Howard K. Stern, another defendant, and tried to refer her to an addiction specialist, but she refused, Gagne said.

In 2005, Gagne said, Kapoor prescribed numerous sedatives for Smith in substantial amounts. She was under his care when she checked into a hospital to withdraw from the sedatives during her pregnancy in 2006.

However, the day she was released, Kapoor began writing her prescriptions again for sedatives, Gagne said.

"They're excessive. They're without medical basis, and they fly in the face of treatments" received at the hospital, he said. "One presumes it was in response to requests from the patient for medication."