Washington (CNN) -- An Idaho man who fired an assault rifle at the White House and struck the residential wing in 2011 pleaded guilty on Wednesday to terrorism and weapons charges.
Oscar Ramiro Ortega-Hernandez, 22, of Idaho Falls, drove 2,000 miles to Washington to carry out the attack, the Justice Department said.
On Nov. 11, 2011, shortly before 9 p.m. ET, he stopped his car in the middle of Constitution Avenue and fired at least eight shots from a Romanian Cugir semi-automatic, an AK-47 style rifle, through the open passenger window.
He sped off but crashed nearby, managing to get away on foot and ultimately hopping aboard an empty car of a freight train.
He was arrested in Indiana, Pennsylvania, five days later.
No one was hurt in the incident.
Ortega-Hernandez faces a minimum of 10 years in prison, and a possible maximum of just over 27 years under sentencing guidelines.
He admitted that the attack was an act of terrorism.
"Firing an assault rifle at the White House to make a political statement is terrorism, plain and simple," U.S. Attorney Ron Machen said in a statement that also made reference to this week's Washington Navy Yard shooting.
"As we have seen this week, gunmen who come to the nation's capital bent on violence can inflict terrible damage," Machen said.
According to the FBI, Ortega-Hernandez's friends reported that he made anti-government statements beginning in 2010.
He believed that the federal government was trying to control Americans through GPS, fluoride and aspartame.
He was also angry at what he believed was U.S. bullying of other countries, including in the wars in Afghanistan and Iraq, and claimed that the president was the "anti-Christ" and told friends he was "on a mission from God to take out Obama."
He bought the assault rifle from a private seller the previous March for $550, and later bought more than 1,200 rounds of ammunition and a scope, federal authorities said.
He practiced shooting on federal land near Idaho Falls.
According to the FBI, Ortega-Hernandez made two short videos on October 23, 2011, praising Osama bin Laden for having the courage to stand up to the United States, and called for a revolution against the federal government.
In the videos, Ortega-Hernandez described himself as a "cold-hearted warrior of God" and declared, "it's time for Armageddon."
After the shooting, FBI and Secret Service agents found eight locations where the bullets struck the White House, including a window sill of the Truman balcony on the south side of the mansion.