A former D.C. police lieutenant was arrested this week at the Library of Congress after officers there found a loaded revolver and ammunition in his briefcase, according to law enforcement authorities and court documents.

The former officer, Yong H. Ahn, 55, who left the force 15 years ago, was charged with carrying a gun without a license and was freed pending a hearing scheduled for Aug. 11.

A D.C. Superior Court judge ordered Ahn, who goes by the name Jeffrey, confined to his home in Lorton, Va., with an electronic-monitoring device and barred him from the U.S. Capitol grounds.

Ahn was secretly arrested by the FBI in February 1998 and was accused of accepting illegal gratuities from operators of massage parlors. The FBI then tried to use Ahn, who left the force 15 years ago, in a bribery sting aimed at then-Mayor Marion Barry (D), according to court documents.

Authorities aborted the sting operation after it was leaked to the news media, and Ahn was sentenced to four months in federal prison. Barry, who died in November 2014, had returned to the mayor’s office in 1995, less than three years after being released from a prison sentence for possessing crack cocaine.

Ahn’s attorney, David Benowitz, said his client “did not violate the law,” but he declined to comment further on the case, saying the details will emerge in court. Benowitz also declined to comment on Ahn’s past felony conviction or his ties to the Barry sting.

U.S. Capitol Police said Ahn was arrested about 9:45 a.m. Tuesday at the Carriage Entrance of the Library of Congress’s Jefferson Building. The arrest affidavit says that his black briefcase was scanned by an X-ray machine and that a police officer saw what he thought was a gun.

Police put Ahn in handcuffs, opened the case and found a loaded black Charter Arms .38-caliber revolver, five rounds of ammunition and a brown holster, according to the arrest affidavit.

The court documents says Ahn claimed to be a D.C. police officer who was on duty and entitled to carry the weapon. But he could provide neither police identification nor a permit for the weapon. Capitol police found the felony conviction during a records check.

A D.C. police spokeswoman confirmed that Ahn had left the force 15 years ago, which would have been about the time he was sent to prison. It was not clear Friday whether Ahn resigned or was fired upon his felony conviction.

Ahn told court officials that he had worked 26 years for a cleaning company in Virginia.