An inmate at Old Colony Correctional Center in Bridgewater has been charged with plotting to kill President Barack Obama, the District of Massachusetts' U.S. Attorney’s Office announced Monday.

Alex Hernandez, 31, of Worcester, was charged with two counts of threatening to kill and inflict bodily harm on the President of the United States, U.S. Attorney Carmen M. Ortiz announced Monday.

RELATED: Civilian joins fight against ISIS

According to the criminal complaint, in March 2015, federal agents learned that Hernandez disclosed to a fellow inmate — who had already been cooperating with the government — that he was upset about the way “his people” were being treated, wanted to become a mujahedeen – another term for someone engaged in Jihad – and supposedly had the ability to obtain weapons when released from prison. He claimed he would attack the President in a lone-wolf style attack upon his release from prison.

Based on these allegations, federal agents decided to introduced Hernandez to an undercover agent posing as an embassy contact, who reportedly claimed he could help Hernandez in getting false travel documents and facilitating his mobility out of prison.

RELATED: Belgium seeks up to 18 year jail terms for ISIS plotters

Searches of Hernandez’s jail cell allegedly uncovered handwritten notes that had the word “kill” underneath all the U.S. presidents assassinated while in office, as well as images of Sept. 11, 2001, Osama bin Laden and members of ISIS holding weapons of attack and the Islamic State of Iraq and the Levant (ISIL) flag.

The charging statute provides a sentence of no greater than five years in prison, three years of supervised release and a fine of $250,000.