A special prosecutor was appointed Thursday to present the state’s case against a Cook County judge accused of bringing a loaded gun into the Leighton Criminal Courthouse.

Judge Joseph Claps, 70, faces a misdemeanor count of bringing a weapon into a prohibited area after a handgun allegedly fell from his jacket pocket as he walked through the courthouse lobby on July 3.

Two Cook County Sheriff’s deputies who were walking by saw Claps drop the gun and reported the incident, which was recorded by courthouse security cameras, the sheriff’s office said.

At the hearing Thursday at the Maywood Courthouse, Will County Judge Edward Burmilla accepted the appointment of David J. Robinson, chief deputy director of the Office of the Illinois State’s Attorney’s Appellate Prosecutor, to try the case.

The appointment of a special prosecutor was necessary after the Cook County State’s Attorney’s Office and the Illinois Attorney General’s Office declined to prosecute the case, citing conflicts of interest.

Burmilla was brought in to the hear the case last month after a Cook County judge similarly cited a conflict in presiding over the case.

The office of the appellate prosecutor handles cases at the request of state’s attorney’s offices in Illinois when conflicts arise.

Robinson also offered to have the case tried in a Will County courtroom, if it would be easier for Burmilla to fit the hearings into his schedule.

Burmilla said he thought it would be easier for him to get to Cook County than having everyone else commute to Will County.

Claps’ next hearing is on Aug. 23.