RICHMOND, Va. (AP) - A convicted felon who was radicalized in prison and expressed support for the Islamic State has pleaded guilty to acquiring a gun after he was released from a Virginia prison.

Casey Charles Spain pleaded guilty Friday to being a felon in possession of a firearm. He faces a maximum sentence of 10 years in prison.

Spain spent more than seven years in prison after being convicted of abduction with intent to defile. Federal prosecutors said that while incarcerated, Spain expressed a desire to commit violence, swore a pledge of loyalty to the leader of ISIS and obtained a tattoo of the ISIS flag.

Several weeks after he was released in August, Spain was arrested after he received an inoperable semiautomatic gun during an FBI sting operation.