Bystander captured video of Omar J. Gonzalez who jumped the fence around the White House Friday and sparked a security alert. Gonzalez got inside the front door of the White House before getting caught. (Alan Pawlinski via YouTube)

Bystander captured video of Omar J. Gonzalez who jumped the fence around the White House Friday and sparked a security alert. Gonzalez got inside the front door of the White House before getting caught. (Alan Pawlinski via YouTube)

Federal prosecutors alleged Monday in federal court that a man who jumped a fence and ran into the White House’s unlocked front door Friday night posed a threat to President Obama and was keeping 800 rounds of ammunition, two hatchets and a machete in his car, parked blocks away.

Omar Jose Gonzalez, 42, formerly of Copperas Cove, Tex., appeared before U.S. Magistrate Judge John M. Facciola of the District on one charge of unlawfully entering a restricted building or grounds while carrying a deadly or dangerous weapon.

After a 15-minute hearing, Facciola ordered Gonzalez held until Oct. 1, pending revocation of bond by authorities in an unrelated July 19 incident in Wythe County, Va. In that case, he was arrested while allegedly carrying a sawed-off shotgun, two sniper rifles and several other firearms, as well as a map of the Washington area with the Masonic Temple in Alexandria, Va., circled and a line pointed toward the White House, a local prosecutor said.

Authorities in Wythe County, about 300 miles southwest of Washington, released Gonzalez and referred to a grand jury felony charges of eluding a police officer while possessing a sawed-off shotgun.

On Aug. 25, U.S. Secret Service officers saw Gonzalez carrying a hatchet in the back waistband of his pants along the south fence of the White House and questioned him, Assistant U.S. Attorney David Mudd said. Gonzalez agreed to let them search his vehicle, parked nearby on New York Avenue NW, but at that time they found only camping gear and two dogs, and released him, Mudd said.

This Sept. 21, 2009 photo provided by Jerry Murphy shows Omar Gonzalez, who was married to Murphy's mother, Samantha, until they divorced in 2012. (AP)

The Secret Service learned of the circumstances surrounding Gonzalez’s July 19 arrest in Wythe County shortly after stopping him last month, according to a person familiar with the facts of the case, but it is unclear exactly when or how it factored into its decision to release him or take any further actions.

A spokesman for the Secret Service declined to comment on an active criminal case and said a comprehensive after-action review was underway including Gonzalez’s criminal history and contacts with agency personnel.

On Monday, Mudd told the federal court, Gonzalez’s “preoccupation with the White House and accumulation of a large amount of ammunition in apparently a short period of time represented a danger to the president.”

The Secret Service on Saturday began a security review to learn how Gonzalez, who was carrying a Spyerdco VG10 folding knife with a 31 / 2 - inch serrated blade in his pocket, was allegedly able to breach the White House doors after jumping the Pennsylvania Avenue fence and sprinting more than 70 yards across the North Lawn. It is the first time a fence-jumper has entered the White House.

Obama and his family had left the White House about 10 minutes before the incident occurred at 7:20 p.m. Friday.

In the wake of the incident the Secret Service has increased foot patrols and stepped-up surveillance, White House press secretary Josh Earnest told reporters Monday. He said changes also were made at the gate used by guests.

“The Secret Service does a great job,” Obama said Monday. “I’m grateful for all the sacrifices they make on my behalf and on my family’s behalf.”

1 of 26 Full Screen Autoplay Close Sept. 20, 2014 Sept. 19, 2014 1861-1980 Skip Ad × Security reviewed after fence-jumper enters White House View Photos The Secret Service is under scrutiny after a man scaled the White House fence and made it all the way through the front door before he was apprehended. Caption The Secret Service is under scrutiny after a man scaled the White House fence and made it all the way into the East Room. Sept. 22, 2014 Security is heightened around the White House following Friday’s breach. Omar Jose Gonzalez, 42, appeared before a judge on one charge of unlawfully entering a restricted building or grounds while carrying a deadly or dangerous weapon. Nikki Kahn/The Washington Post Buy Photo Wait 1 second to continue.

According to an affidavit signed by Secret Service officer David Hochman, Gonzalez after his arrest told Agent Lee Smart that he was concerned that the “atmosphere was collapsing” and that he needed to inform the president to get the word out to the people.

However, neither prosecutors nor Gonzalez’s assigned defense attorneys invoked his mental competency as an issue for now. Assistant Federal Public Defender David Bos said Gonzalez understands the proceeding against him.

Gonzalez’s friends and relatives said that he is suffering from post-traumatic stress disorder after serving six years in Iraq with the Army Special Forces as a sniper, and that he had been living in his car and staying where he could for the past couple of years.

Gonzalez’s attorneys have said that Gonzalez has no convictions and that he served 18 years in the U.S. military, including three tours in Iraq.

The Army said he served from 1997 until his discharge in 2003, and again from 2005 to December 2012, when he retired due to disability. The Army said he was a cavalry scout and served in Iraq from October 2006 to January 2008 and had been posted to Fort Hood, Tex. and Joint Base Lewis-McChord, in Washington state.

In the Virginia incident, Gonzalez was arrested before noon July 19 while driving a gray Ford Bronco sport utility vehicle northbound on Interstate 81 near Wytheville, after reaching a speed of 83 miles per hour, driving in the median several times, and not responding to a Virginia State Police trooper’s signal to stop, prompting other troopers to join a 20-mile chase, according to Wythe County prosecutors.

In the SUV, police found two sniper rifles, an assault rifle, a bolt-action rifle, one sawed-off and one intact shot gun, five handguns, more than seven loaded magazines of ammunition and the map, authorities said.

In addition to the marks around the Masonic Temple and White House, handwriting on the map read “Easter mon” and “Manassas Battlefield yellow trail,” said Deputy Commonwealth’s Attorney David Saliba.

The only illegal firearm was the sawed-off shot gun, Saliba said, although State Police seized all the weapons pursuant to a search warrant in Pulaski County where Gonzalez was pulled over, and are holding them as evidence. Gonzalez posted $5,000 bond and was released from jail that day, Saliba said.

Gonzalez returned to Wythe County General District Court Sept 11, where a judge referred felony counts of eluding police and possessing a sawed-off shotgun to a grand jury, which is scheduled to meet Oct. 20, and prosecutors dropped misdemeanor charges of reckless driving and improper passing, Saliba said.

Saliba said State Police troopers noted that Gonzalez indicated he was a veteran and had been treated for post-traumatic stress disorder, but they did not regard him as dangerous or mentally unstable.

Saliba said he believed the case was handled appropriately.

“We see a lot of cases on the interstate. We have [Interstates] 81 and 77 both running through here. But for the sheer number of guns, the only illegal firearm was the sawed-off shotgun,” Saliba said. He added, “And he [Gonzalez] was former military. He had been discharged, and he did not to the trooper seem to be a threat or anything like that.”

Secret Service officers are trained not to shoot intruders on the grounds unless they appear armed or are wearing bulky clothing or backpacks that could indicate they are carrying a bomb. The officers did not release an attack dog for reasons that are under investigation.

The Secret Service is considering closing portions of Pennsylvania Avenue to the public, adding barriers around the White House compound’s perimeter and screening visitors farther from entrance gates.

This story has been updated.