An American supporter of ISIS was sentenced to a decade in prison on Tuesday for being a felon in possession of a firearm.

"Casey Charles Spain, 29, of Richmond, Virginia, who is a previously convicted felon and supporter of the Islamic State of Iraq and al-Sham (ISIS), a designated foreign terrorist organization, was sentenced today to the statutory maximum of 10 years’ imprisonment, for being a felon in possession of a firearm less than three weeks after he was released from prison," a press release from the Department of Justice said. "Spain was reportedly fixated on attacking a target such as the Marine Corps Base in Quantico, and was excited about potentially attacking police stations, as well as an armory in Richmond."

Spain had previously been imprisoned for a number of different crimes. He served time for stabbing someone with a sword and was most recently imprisoned for abducting a 15-year-old girl in an attempt to rape her. While in prison for the kidnapping, he became radicalized.

The DOJ said Spain "swore a pledge of loyalty, commonly known as bayat, to Abu Bakr al-Baghdadi, the leader of ISIS." He even went so far as to have the ISIS flag tattooed on his back. DOJ said he "repeatedly expressed a desire to engage in acts of violence" before being released from prison.

"After Spain was released from prison on Aug. 11, 2017, he discussed on recorded telephone calls with still-incarcerated prisoners his desire to travel overseas and join ISIS," the DOJ said. "The FBI began conducting surveillance of Spain immediately upon his release, including making covert contact with him using FBI undercover employees (UCE) and a Confidential Human Source (CHS). Spain spoke on multiple occasions to the CHS about his strong desire to obtain a firearm. During that same time period, Spain established a Facebook account to speak with individuals located overseas about ISIS and his desire [to] serve as a mujahid (fighter) for the terrorist organization."

On Aug. 31, 2017, Spain attempted to buy a "semiautomatic handgun with a 50-round barrel canister" from an undercover FBI agent. However, the sale was part of an FBI sting operation and SWAT team members quickly apprehended Spain despite his attempt to flee the scene.

Attorney Raj Parekh of the FBI National Security Division's Counterterrorism Section and Assistant U.S. Attorney Brian Hood prosecuted Spain before U.S. District Judge John Gibney Jr.