A man who jumped the White House wall in March was shot and killed in a Pennsylvania courthouse Tuesday after allegedly attacking a deputy sheriff with a knife.

The incident occurred at approximately 11:50 a.m. inside the Chester County Justice Center in West Chester, Pa. District Attorney Tom Hogan said in a press conference Tuesday afternoon that Curtis Smith, 34, of Coatesville, Pa., "came directly into the Justice Center, pulled out a knife, and attacked a deputy sheriff, slashing him." According to Hogan, another deputy sheriff then shot Smith, who was taken to a local hospital, where he died. The deputy sheriff who was attacked is being treated for injuries to his hands and arms, and the other deputy sheriff involved is being interviewed by authorities.

"Unfortunately because of incidents like this across the nation, we have learned how to deal with an attack at the courthouse," Hogan said. "Nobody else was injured. The sheriffs did their job."

The Chester County Sheriff's Department and the district attorney's office did not return requests for comment Tuesday. Though it is not clear why Smith was at the courthourse Tuesday, NBC10 Philadelphia, reported that Smith faced burglary, assault and harassment charges after being arrested in May.

The May arrest came roughly two months after Smith was arrested in the District of Columbia for breaching the White House perimeter. According to court documents, Smith was arrested near the White House on March 1 and charged with unlawful entry after climbing the stone wall on the outer perimeter. Smith climbed over the southeast vehicle entry point at the White House, and when officers approached him, he walked toward the police vehicle and presented his hands behind his back for arrest. Smith allegedly "stated that he left his home of origin and drove to the White House to pass a message to the president."

Smith pleaded "not guilty" to the charge, which carried a maximum punishment of six months in prison and/or a $1,000 fine. According to a spokesman for the U.S. Attorney for the District of Columbia, Smith entered into a "deferred prosecution agreement," which dictated that Smith stay away from the White House for six months. The agreement stated that if Smith abided by that condition, did not violate any laws or court orders and was not arrested during those six months, the government would dismiss the case. The Superior Court docket showed that a status hearing was set for Oct. 9.

Smith's security breach was part of a string of fence-jumping incidents that led the Secret Service to add spikes to the top of fence surrounding the White House.