A man from the United Arab Emirates living in Melbourne illegally was arrested Wednesday on weapons charges.

The United States Attorney's Office for the Middle District Florida said Hamid Mohamed Ahmed Ali Rehaif, 25, is charged with possession of ammunition by an unlawful or illegal alien.

He is being held in federal custody and has waived his detention hearing, the U.S. Attorney's Office said. He is scheduled to have his preliminary hearing in U.S. District Court in Orlando on Monday.

Investigators say in 2013, Rehaif was admitted into the United States under a student visa and had been enrolled at the Florida Institute of Technology in Melbourne but was terminated as a student in the fall of 2014.

When Rehaif failed to leave the country within 30 days of his termination as a student, he became an unlawful alien, federal officials said.

On Wednesday, U.S. Immigration and Customs Enforcement’s Homeland Security Investigations and Federal Bureau of Investigation agents said they made contact with Rehaif at a hotel in Melbourne, where he had been living for the past two months, paying more than $11,000 in cash for room fees.

Agents said Rehaif admitted to possessing several firearms but had recently sold or disposed of them but admitted to firing the weapons at two local gun ranges.

Agents said they located rounds of handgun and rifle ammunition in his hotel room and in a storage unit he had rented but did not find any firearms.

If convicted, he faces a maximum penalty of 10 years in federal prison.