Updated

Rush Limbaugh must submit to random drug tests under an agreement filed Monday that will dismiss a prescription fraud charge against the conservative commentator after 18 months if he complies with the terms.

He also must continue treatment for his acknowledged addiction to painkillers and he cannot own a gun.

The agreement did not call for Limbaugh to admit guilt to the charge that he sought a prescription from a physician in 2003 without revealing that he had received medications from another practitioner within 30 days. He pleaded not guilty Friday.

"Do you think if there was any real evidence, we would have reached a settlement?" Limbaugh said Monday on his radio show.

Limbaugh said that he has been undergoing random drug tests for 2 1/2 years and "haven't even craved a painkiller since I got out of rehab."

His attorney, Roy Black, said in a statement Monday to The Associated Press that the agreement was "a common sense resolution and the appropriate way the state should treat people who have admitted an addiction to prescription pain medication and voluntarily sought treatment."

Prosecutors launched their investigation in 2003 after Limbaugh's housekeeper alleged he abused OxyContin and other painkillers. He entered a five-week rehabilitation program that year and blamed his addiction on severe back pain.

"I spoke recently with his doctor who told me Mr. Limbaugh has made an exceptionally strong recovery and remains firmly committed to continued treatment," Black said.

The Palm Beach County State Attorney's Office may revoke or modify the deal if Limbaugh violates the terms, according to the agreement.

Limbaugh, 55, had blasted the investigation as a "fishing" expedition and repeatedly maintained he was innocent.

Prosecutors accused him of illegally deceiving multiple doctors to receive overlapping prescriptions, a practice known as doctor shopping. After seizing his medical records, authorities learned Limbaugh received up to 2,000 painkillers, prescribed by four doctors in six months.

However, the single charge only alleges that Limbaugh illegally obtained about 40 pills, said Mike Edmondson, a state attorney's spokesman. He would not elaborate or explain why prosecutors scaled back the case.