Federal investigators on Thursday found a loaded gun that had been smuggled into the Lower Manhattan prison where Jeffrey Epstein killed himself last summer.

The handgun was located inside a housing unit at the Metropolitan Correctional Center, which had been on a weeklong lockdown as prison officials searched for the weapon, the Associated Press reported.

Officials didn’t say how the gun was smuggled in or how they knew to search for it.

Federal prosecutors have opened a criminal probe into potential misconduct by guards, focusing on a trove of contraband uncovered during the search for the firearm, including cellphones, drugs and homemade weapons.

The Bureau of Prisons has been under scrutiny since multimillionaire pedophile Epstein hanged himself in his cell at the facility in August while awaiting trial on sex trafficking charges.

Two prison guards failed to check on Epstein the night he killed himself, allegedly sleeping and surfing the internet just 15 feet from his cell.

The guards then allegedly falsified reports to cover up their negligence and make it appear that they had been doing their jobs the night of the suicide.

They’ve each been charged with conspiracy and filing false reports.

The prison currently holds disgraced Nike bribery lawyer Michael Avenatti. It previously held narcotics kingpin Joaquin “El Chapo” Guzman.