Prosecutors investigating whether Rush Limbaugh (search) illegally went "doctor shopping" for prescription painkillers can examine his medical records, a judge ruled Tuesday.

The conservative radio commentator accused prosecutors of going after him for political reasons, and his attorney promptly appealed the ruling.

Circuit Judge Jeffrey A. Winikoff said authorities have a compelling interest in determining whether Limbaugh broke the law, which trumps his right to keep his medical records private. However, the judge said prosecutors cannot make the records public.

Palm Beach County prosecutors insisted they needed to review the records to determine how much Limbaugh's doctors knew about his frequent prescriptions for OxyContin (search), hydrocodone (search) and other painkillers, and whether he was "doctor shopping."

That term refers to looking for a doctor willing to prescribe drugs illegally, or getting prescriptions for a single drug from more than one doctor at the same time.

"Those records are the only way to clarify the violation of law that we're investigating," prosecutor James Martz argued.

Investigators seized records from Florida and California doctors last month after discovering that Limbaugh received more than 2,000 painkillers, prescribed by four doctors in a six-month period, at a pharmacy near his $24 million Palm Beach mansion.

Limbaugh's attorneys argued that the seizure violated the broadcaster's privacy. Martz said the records were taken to ensure they were not tampered with or destroyed.

Limbaugh recently admitted his addiction to painkillers, blaming severe back pain. He took a five-week leave from his afternoon national radio show to go into rehab.

During his Tuesday show, Limbaugh accused authorities of leaking information to damage his reputation, and said prosecutors have a political agenda.

"The Democrats still cannot defeat me in the arena of political ideas. And so now they're trying to do so in the court of public opinion and the legal system," Limbaugh said. Prosecutor Barry Krischer disputed the allegations.

Limbaugh's lawyer, Roy Black, said: "Mr. Limbaugh was not doctor shopping and he should not have to sacrifice his privacy to prove his innocence." He asked a judge to prohibit prosecutors from viewing the records until his appeal is decided.

Authorities began investigating Limbaugh last year after his former maid told them she had supplied him with prescription painkillers for years.

At a hearing Monday, Black said his client suffered from a degenerative disc disease with "pain so great at one point doctors thought he had bone cancer," but Limbaugh chose to take painkillers rather than undergo surgery. Surgery to reach the affected part of Limbaugh's spine could have threatened his voice, Black said.

Limbaugh's former maid, Wilma Cline, threatened to sell the story to The National Enquirer, Black said. She and her husband demanded millions from Limbaugh and were "paid substantial amounts," the lawyer said.

Black called the payments blackmail. The Clines' attorney, Ed Shohat, denied his allegation.