A knife-carrying Army veteran who scaled a White House fence and dashed into the executive mansion before being caught pleaded guilty Friday in connection with the case.

Omar Gonzalez pleaded guilty to entering or remaining in a restricted building or grounds while carrying a deadly or dangerous weapon and assaulting, resisting or impeding a Secret Service officer.

The Sept. 19 incident in which Gonzalez was able to breach White House security preceded the disclosure of other serious Secret Service breaches in security for President Obama and ultimately led to Julia Pierson's resignation as director of the agency after 18 months on the job.

Obama, the first lady and their daughters were not home when Gonzalez got inside the mansion, though Obama and his daughters had just left the White House aboard a helicopter on their way to Camp David, the presidential retreat in Maryland.

After Gonzalez's arrest, investigators found hundreds of rounds of ammunition, a machete and two hatchets in his car. A folding knife he was carrying in his pants pocket when he was arrested had a blade that was 3.5 inches long, according to the Secret Service.

Gonzalez, who previously lived in Copperas Cove, Texas, allegedly told a Secret Service agent after his arrest that he "was concerned the atmosphere was collapsing and needed to get the information to the president of the United States so that he could get the word out to the people."