A federal contractual police officer accidentally shot himself in the leg Wednesday afternoon while in a traffic control booth on Pennsylvania Avenue, four blocks from the White House, according to authorities.

The officer, who was not identified, was reported in good condition at a hospital. He is a member of the Protective Security Service, which guards government buildings under a contract with the Federal Protective Service, under the Department of Homeland Security.

The Federal Protective Service said that the officer was in the booth in the 1200 block of Pennsylvania Avenue NW when “his pistol discharged in his holster.” He was struck in the right leg. The incident occurred about 1:30 p.m.

Authorities did not say whether the officer was assigned to a particular building. The Federal Protective Service is investigating.