A police chief is now out of the hospital a day after he was accidentally shot in the leg.

Police say the accidental shooting occurred inside the municipal court building on 1 Municipal Drive in Bordentown Township, New Jersey around 3:50 p.m. on Tuesday.

Bordentown Township Police Chief Frank Nucera, who also acts as the township administrator, was inside the Tax Assessors office when his .45 caliber gun accidentally went off and struck him once in the leg, according to investigators.

Nucera was taken to the Helene Fuld Medical Center in Trenton where he underwent a successful surgery. He was released from the hospital on Wednesday and is expected to make a full recovery.

Nucera was the only person hurt during the incident. The building was placed on lockdown and employees were sent home for the day. The lockdown was later lifted.

Investigators say a juvenile was somehow involved in the accidental shooting though they have not yet revealed how. That juvenile is currently being questioned, according to investigators.