Prosecutors initially charged Oscar Ramiro Ortega-Hernandez, 23, with attempting to assassinate President Barack Obama but agreed to drop the charge as part of a plea deal last year.

Ortega-Hernandez instead pleaded guilty to two charges, including damaging the home.

Obama and his wife Michelle were not home at the time of the shooting, and no one was injured. Prosecutors, however, said Ortega-Hernandez jeopardized the lives of two other members of the Obama family who were at the home as well as White House employees and staff, Secret Service agents and bystanders.

According to AP, prosecutors said the bullets from Ortega-Hernandez’s gun did nearly $100,000 damage to the home. They asked that he spend 27 ½ years in prison.

Ortega-Hernandez's lawyers argued that he was suffering from extreme depression and mental stress at the time of the shooting and was under the misguided belief that the end of the world was coming. Ortega-Hernandez's lawyers said his motivation in firing a gun at the White House was to "call attention to what he believed was the coming apocalypse."

Ortega-Hernandez, who is from Idaho Falls, Idaho, acknowledged as part of the plea deal in the case that he drove his car on Constitution Avenue, south of the White House, stopped and fired at least eight rounds from his semi-automatic assault rifle at the second and third stories of the White House.

He pleaded guilty to injury to a dwelling and placing lives in jeopardy as well as discharging a firearm during a crime of violence, according to AP.

In September, the White House was locked down in a sudden security alert after a man threw firecrackers over the outer fence.