An Iraqi-born man was sentenced Monday to nearly five years in prison after trying to buy machine guns and hand grenades in a federal sting operation.

Ahmed Hassan Al-Uqaily (search), 34, was arrested last October during the investigation prompted by his alleged threat about "going jihad" against the United States, investigators said.

The FBI's Joint Terrorism Task Force (search) said Al-Uqaily paid $1,000 for two disassembled machine guns, four disassembled hand grenades and hundreds of rounds of ammunition.

Under a plea agreement, he was sentenced to 57 months in prison and three years supervised release. He can be deported to Iraq (search) after he serves the prison time.

Prosecutors said they were not sure what Al-Uqaily planned to do with the weapons but felt he was no longer a threat. Defense attorney David Baker wouldn't comment.