A recently released surveillance video showed a judge dropping a silver-toned pistol inside Chicago’s Leighton Criminal Court Building — an area where only law enforcement officers are allowed to carry guns.

The video shows Judge Joseph Claps walking across the courthouse lobby with his suit jacket draped over his arm. All of a sudden, the pistol stumbles out and Claps is seen stooping to retrieve it and puts it in his pant pocket.

Even though the video does not have any sound, it is clear that people noticed the pistol falling out as two women — who had waved to Claps as he was walking out — turn back when the firearm drops on the floor. One of the women was the sheriff’s deputy, according to the Washington Post.

The incident came to light when the sheriff’s deputy informed superiors, which led to the survey of the videotape.

Claps, who is an associate judge in Cook County’s circuit court, was charged with a misdemeanor crime for carrying a gun in a prohibited area. He was not detained.

The pistol was reportedly loaded when the 70-year-old judge dropped it, Cook County Sheriff’s Office chief policy officer Cara Smith said. The incident occurred July 3 and recently went viral.

Apart from being charged, the judge was also reassigned to “non-judicial duties,” pending review by 17 judges of the circuit court, a spokesman for Chief Judge Timothy Evans said, while adding the executive committee of the Circuit Court of Cook County made the call regarding Claps, CBS reported.

The spokesman said judges can be temporarily assigned to non-judicial duties “whenever there are charges of implications of improper conduct, depending on the severity and nature." Such duties might include conducting marriage ceremonies, reviewing petitions for drop in court-filing fees and handling legal research.

Smith said the Claps does possess a gun owner identification card and a concealed carrying license; however, that does not mean he is allowed firearms in places where they are prohibited.

Courthouse workers, including judges and deputies, get inside the building without going through the metal detectors.

The chief judge’s office also clarified Claps had no exemption or even authorization to carry a firearm in the prohibited area.

Claps’ court date has been set as July 19. The case was reportedly referred to the Illinois attorney general in order to avoid conflicts of interest between the prosecutors and Claps as they were colleagues, Cook County State’s Attorney’s Office said.

Claps who has been a judge for more than 20 years has worked with the state attorney general as top assistant and also as a Cook County prosecutor.