Surveillance video released in federal court shows Jesse A. Olivieri, 31, of Ashland, Pa., approaching a White House gate on May 20 while armed with a gun. (U.S. District Court for the District of Columbia)

A Pennsylvania man shot by a U.S. Secret Service agent at a White House gate on May 20 was ordered detained Monday by U.S. Magistrate Judge G. Michael Harvey of the District.

Jesse A. Olivieri, 31, of Ashland, Pa., was charged by police complaint June 3 with one felony count of resisting or impeding certain officers or employees with a dangerous weapon.

Harvey granted prosecutors’ request to hold Olivieri after reviewing two video clips, each roughly 45 seconds long with no sound, apparently showing Olivieri walking toward the White House from the south across E Street NW with a handgun pointed at the ground, ignoring officers and then getting shot in the chest.

Olivieri was apparently shot while walking toward a security barrier, staring at the ground, after he raised his left hand apparently to wave off some distraction, one video showed. A moment later, he clutched his chest, crumpled and tumbled to the base of barrier, where the agent who shot him rushed to his side.

Olivieri, bearded with scraggly brown hair in a wheelchair, did not speak at the hearing, nor did his parents, who were in attendance.

Assistant U.S. Attorney John Crabb Jr. said that U.S. Secret Service Special Agent Kevin Moloney, who shot Olivieri, “feared for his life.”

Assistant Federal Defender Loui Itoh requested home detention for Olivieri, saying he never pointed or shot the handgun at anyone, had no prior criminal record, was living with his parents, had received psychiatric treatment from two hospitals and is now under medication.

“I do find that Mr. Olivieri is a danger both to himself and the community,” Harvey said. “This is a serious crime, a crime of violence involving law enforcement officers whose job it is to protect the perimeter of the White House.”