Rush Limbaugh and prosecutors in the long-running painkiller fraud case against him have reached a deal calling for the only charge against the conservative commentator to be dropped if he continues treatment, his attorney said Friday.

Limbaugh was booked on a single charge that was filed Friday, said Teri Barbera, a spokeswoman for the Palm Beach County Jail. He left about an hour later, after Limbaugh was photographed and fingerprinted and he posted $3,000 bail, Barbera said.

The radio giant's agreement to enter a diversionary program ends a three-year state investigation that began after Limbaugh publicly acknowledged being addicted to pain medication and entered a rehabilitation program.

Prosecutors accuse him of "doctor shopping," or illegally deceiving multiple doctors to receive overlapping prescriptions. They learned that he received about 2,000 painkillers, prescribed by four doctors in six months, at a pharmacy near his Palm Beach mansion.

Limbaugh pleaded not guilty Friday to a charge of fraud to conceal information to obtain prescriptions. Though he steadfastly denies doctor shopping, the charge will be dismissed in 18 months if Limbaugh complies with court guidelines, his lawyer Roy Black said.

"Mr. Limbaugh and I have maintained from the start that there was no doctor shopping, and we continue to hold this position," Black said in an e-mailed statement.

Limbaugh spokesman Tony Knight said the commentator signed the agreement Thursday, and that it called for him to enter the not guilty plea. "It's not in the system moving toward trial. It was all a formality. It's a concluded deal," Knight said.

Mike Edmondson, a spokesman for the state attorney's office, said prosecutors had not yet received the signed agreement.

"I am not disputing the facts, the conditions that Black represented, but until his client signed the agreement, we don't have a full agreement," Edmondson said. "I am sure it's just a timeline issue."

He refused to comment further.

As a primary condition of the dismissal, Limbaugh must continue to seek treatment from the doctor he has seen for the past 2 1/2 years, Black said. Among other provisions, he also has agreed to pay the state $30,000 to defray its investigative costs, Black said.

The warrant alleges that sometime between February and August 2003, Limbaugh withheld information from a medical practitioner from whom he sought to obtain a controlled substance or a prescription for a controlled substance.

Prosecutors began investigating Limbaugh in 2003 after the National Enquirer reported his housekeeper's allegations that he had abused OxyContin and other painkillers. He soon took a five-week leave from his radio show to enter a rehabilitation program and acknowledged he had become addicted to pain medication. He blamed it on severe back pain.

Before his own problems became public, Limbaugh had decried drug use and abuse and mocked President Clinton for saying he had not inhaled when he tried marijuana. He often made the case that drug crimes deserve punishment.

"Drug use, some might say, is destroying this country. And we have laws against selling drugs, pushing drugs, using drugs, importing drugs. ... And so if people are violating the law by doing drugs, they ought to be accused and they ought to be convicted and they ought to be sent up," Limbaugh said on his short-lived television show on Oct. 5, 1995.

Prosecutors seized Limbaugh's medical records after learning about the painkillers he had received at the Palm Beach pharmacy. The investigation was held up as the prosecutors and Black battled in court over whether the records were properly seized.

Limbaugh reported five years ago that he had lost most of his hearing because of an autoimmune inner-ear disease. He had surgery to have an electronic device placed in his skull to restore his hearing. But research shows that abusing opiate-based painkillers also can cause profound hearing loss.