A man who was detained by the Secret Service in March for allegedly jumping over a perimeter wall of the White House was shot and killed by a police officer Tuesday inside a Pennsylvania courthouse.

Investigators told ABC 6 that Curtis Smith, 33, of Coatesville, entered the Chester County Justice Center in West Chester around 12 p.m. and attacked a sheriff’s deputy with a knife.

Another deputy then opened fire at Smith, striking him, according to a district attorney.

Smith later died at an area hospital, while the deputy – who was not identified -- is being treated for arm and hand injuries, the station reported.

Witnesses told FOX 29 that Smith shouted “I’m going to get you!” before lunging at the officer.

Staff inside the building heard three gunshots from the lobby, Sara Finneran, who was visiting the courthouse at the time, told NBC 10.

Chester County District Attorney Thomas P. Hogan said on his Facebook page that a person involved in the shooting has been “neutralized.”

“There was an incident in the lobby of the Chester County Justice Center,” he wrote. “Sheriff’s Deputies neutralized the threat and the area is secure. The Justice Center will be closed to the public for the rest of the day. More details will follow.”

The lobby of the building has been sealed off with yellow crime scene tape, the Daily Local News reported.

Smith was charged with unlawful entry in the March incident.