ORLANDO, Fla. — A student from United Arab Emirates who overstayed his visa has been sentenced to a year and a half in prison for possessing firearms and ammunition.

A federal judge on Monday sentenced Hamid Mohamed Ahmed Ali Rehaif to 18 months in prison for possession of a firearm and ammunition by an unlawful alien.

He will be deported to his home country once he finishes his sentence.

He was convicted in May.

Prosecutors say Rehaif attended the Florida Institute of Technology on Florida’s Space Coast but was academically dismissed in 2014.

He had been living in a Melbourne, Florida hotel room for two months when FBI agents interviewed him in December 2015.

Prosecutors say he became an illegal immigrant when he didn’t leave the United States upon departing school.