Shots rang out in a Philadelphia courthouse on Tuesday as a police officer shot and killed a man who had previously scaled the White House wall and who had charged at an officer with a knife.

Reports said Curtis Smith had entered the courthouse with the weapon knife and run at a police officer, said District Attorney Tom Hogan. Another police officer then opened fire, striking and killing Mr Smith, who was 34.

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

Curtis Smith was shot and killed

Mr Smith had previously faced charges at the court relating to burglary and harassment, as well as for traffic violations. It is not clear why he was at the Pennsylvania courthouse on Tuesday.

District Attorney Tom Hogan said a police officer had shot and Mr smith Smith after his colleague was injured. A uniformed person with a bandaged hand could be seen on a stretcher being loaded into an ambulance, said reports.

Mr Hogan said Mr Smith was the person who jumped the outer perimeter of the White House in March and was detained by Secret Service.

“I see a lot of cops with a lot of guns,” Ron Hung, owner of Bon Bon Sushi, told NBC. “It happened really fast. They [police] just basically roped off the whole area in a couple of minutes.”

The county sheriff’s office, county detectives and the district attorney were all at the courthouse, which will remain closed for the rest of the day.

Mr Hogan wrote on his social media page that the person involved in the incident had been “neutralised.”

“There was an incident in the lobby of the Chester County Justice Centre,” he wrote.

“Sheriff’s Deputies neutralised the threat and the area is secure. The Justice Centre will be closed to the public for the rest of the day. More details will follow.”