A Saudi Arabian student enrolled at the University of New Mexico's school of engineering was charged Friday with illegally possessing a firearm after a search of his Albuquerque residence found a .380-caliber Cobra handgun, according to federal court documents.

Hassan Alquahtani, 28, was scheduled to get his diploma from the university on Saturday before going to Disneyland to celebrate with his family, according to the Albuquerque Journal.

Those plans changed following an FBI investigation into the student, which began after an anonymous person called its National Threat Operations Center on Aug. 8 and said that Alqahtani was "creating a list of people who he wants to kill before he leaves the U.S."

NEW MEXICO MURDER SUSPECT WAS TRYING TO COLLECT $30G DEBT FOR CARTEL: POLICE

That list allegedly included the person who gave the tip, as well as University of New Mexico professors, according to the outlet.

Alqahtani turned himself in to authorities on Friday afternoon, where he appeared before Judge Karen Molzen who ordered him to be held through the weekend. A spokesman for the U.S. Attorney's Office for the District of New Mexico told NBC News that "Alqahtani is not currently charged with anything other than possession of a firearm. I cannot confirm or deny an ongoing investigation of any other conduct."

Assistant U.S. Attorney George Kraehe argued that Alqahtani should stay in custody because the list included UNM professors, according to the Albuquerque Journal. The list wasn't included in the complaint and it's not clear which professors were on it.

According to the complaint, a confidential source said Alqahtani approached him in November with an interest in purchasing an AK-47 rifle and that Alqahtani later said he was interested instead in acquiring a smaller gun for protection. The affidavit says a girlfriend of Alqahtani claimed ownership of the seized gun and is possibly conspiring to conceal his possession of the firearm.

FRED FLEITZ: PENSACOLA NAVAL AIR STATION MURDERS SHOW WHY WE MUST KEEP RADICAL ISLAMIST TERRORISTS OUT OF US

Joel Meyers, a defense attorney for Alqahtani, said he plans to dispute accusations that the seized firearm belonged to Alqahtani, and expressed disappointment at the timing of the arrest on the day before Alqahtani’s graduation ceremony.

“If he was such a concern,” Meyers said, “why the delay until right before his graduation?”

Meyers said Alqahtani is in the U.S. legally on a student visa and that he lives with his wife — described as his girlfriend in the criminal complaint — who is not prohibited from possessing a firearm.

Alqahtani has a detention hearing on Dec. 16

CLICK HERE TO GET THE FOX NEWS APP

In a news release, the U.S. Attorney’s Office in Albuquerque says the firearms charge can carry a penalty up to 10 years in prison.

The Associated Press contributed to the report