LAS CRUCES, N.M. - A retired judge accused of soliciting bribes for former New Mexico Gov. Bill Richardson pleaded no contest Thursday to misdemeanor misconduct, apologizing for what he said were injudicious comments but maintaining he was the innocent victim of a political witch hunt.

Former state district Judge Michael Murphy entered the plea under a deal with prosecutors that dismissed four felony charges and ended a high-profile case that shocked the judiciary two years ago when GOP prosecutors alleged the bribes were part of a long-running practice for picking judges in southern New Mexico.

Under the plea bargain, Murphy was given a 364-day suspended jail sentence, ordered to do 200 hours of community service and barred from ever again holding public office or entering the state district court building in Las Cruces.

Murphy's indictment followed one of a string of investigations into alleged pay-to-play activities with ties to Richardson, a Democrat, over the past five years.

It was the only case that resulted in criminal charges. Richardson has called the allegations "outrageous and defamatory."

Special Prosecutor Matt Chandler said he believes he could have won a conviction on the felony charges, but that he agreed to let Murphy plea to the lesser charge because he believes that given Murphy's age and health issues, it was unlikely he would have faced a stiffer sentence. Additionally, he said, with a plea agreement Murphy is unable to appeal the conviction.

"We have removed him from the bench and he will forever be a convicted criminal," Chandler said following the hearing. "This is a just solution for the citizens of Dona Ana county and the defendant."

But defense attorney Michael Stout told the judge that Murphy "couldn't get convicted because this is not true. And this is a politically motivated witch hunt. But we know there was no witch found."

Stout said Murphy was a loud mouth who "said things to get people's attention. That's his biggest problem."

"The most damaging facts against Judge Murphy were not crimes at all but were instead boorish, ill-advised and impolitic comments made in private conversations," Stout said. "While his comments surely gave an opening for criticism, Judge Murphy's private conduct did not call for the treatment he received."

As a result of the charges, he said, Murphy has lost his income, his retirement and health benefits.

The allegations date to 2007, when potential judicial candidate Beverly Singleman said she sought advice from state District Judge James Martin on how to get her name on the list for appointment to a vacancy on the bench.

During a lunch with Martin and Murphy, Singleman said Murphy told her she needed to make weekly contributions to a democratic activist, who funneled the money to then-Gov. Richardson. Singleman reported the allegations to state District Judge Lisa Schulz, who reported them to authorities.

Republican Gov. Susana Martinez was Dona Ana County district attorney at the time and running to replace Richardson when she appointed Chandler, district attorney for Curry and Roosevelt counties, as special prosecutor to investigate the case.

Richardson was not running for re-election because of term limits, but Martinez campaigned hard on cleaning up corruption in state government and made Richardson the poster child for everything that was wrong in New Mexico.

Chandler insists the investigation was not politically motivated.