An Idaho man who confessed to attempting to assassinate President Barack Obama was sentenced to 25 years in jail on Monday.

Oscar Ortega-Hernandez, 23, plead guilty to terrorism and other charges earlier this week in federal court. According to CNN, Ortega-Hernandez said he shot at the White House in an attempt to kill President Obama back in November 2011.

He had not been charged with attempting to assassinate the President in exchange for a plea deal he initially made with prosecuting lawyers. Ortega-Hernandez had been reportedly pleading with his judge in Washington for a ten-year sentence, while prosecutors asked for Ortega-Hernandez to spend 27.5 years in jail for his actions.

β€œHe was motivated by hatred for the President and the desire to start a revolution against the federal government,” U.S. Attorney and case prosecutor, Ronald Machen, said.

KPVI News 6 reports that Ortega-Hernandez is appealing his sentence. His lawyer filed the notice of appeal, which was one page, on Friday.