(CNN) A student attending a New Mexico university was arrested on federal court charges a day before his graduation, according to court documents and his attorney.

Hassan Alqahtani, 27, an engineering student at the University of New Mexico in Albuquerque was charged with illegal possession of a firearm, according to an affidavit from the US District Court for the District of New Mexico.

He was arrested Friday after the FBI served a search warrant on his home on Thursday and found a .380-caliber firearm, ammunition and a box for the firearm, according to the documents.

Prosecutors claim Alqahtani was interested in buying other firearms, including an AK-47 rifle.

Authorities began investigating Alqahtani after a person sent a tip to the FBI National Threat Operations Center in August, claiming Alqahtani, a Saudi Arabian citizen, was putting together "a list of people who he wants to kill before he leaves the US" and that he had a firearm, the federal affidavit said.

Read More