A Saudi man attending a New Mexico university was charged Friday with illegally possessing a firearm, according to federal court documents.

Hassan Alqahtani, 28, who is enrolled at the University of New Mexico's school of engineering was charged with illegal possession of a firearm by a person admitted to the U.S. under a non-immigrant visa, federal prosecutors said.

The FBI said in an affidavit that a search of his home Thursday turned up a .380-caliber Cobra handgun.

The affidavit says the FBI began investigating Alqahtani after a person who said he knows the student called an agency tip line on Aug. 8, claiming Alqahtani was "creating a list of people who he wants to kill before he leaves the U.S." which included the tipster and University of New Mexico professors.

The affidavit does not include any details about the alleged list and does not mention any threats to kill people.

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."

The university did not immediately respond to a request for comment.

Alqahtani turned himself into authorities Friday afternoon and appeared before a judge who ordered him held through the weekend, the Albuquerque Journal reported. He is scheduled for a detention hearing Monday.

Assistant U.S. Attorney George Kraehe argued that Alqahtani should remain in custody because the alleged list included professors, and the school's graduation is Saturday, the newspaper reported.

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, The Associated Press reported.

"If he was such a concern," Meyers said, according to the AP, “why the delay until right before his graduation?"

The affidavit does not explain how the gun was obtained. The person who called the tip line in August told investigators that Alqahtani told him his cousin bought it in the U.S. before the cousin returned to Saudi Arabia, according to the document.

The criminal complaint also says a "confidential human source" told investigators last month that Alqahtani approached the source and said he was interested in buying an AK-47 rifle. He showed the person a video of a wedding in Saudi Arabia, where people were shooting an AK-47 rifle, according to the affidavit.

Alqahtani told the person he didn't like his old gun and wanted a new one, the complaint says. But Alqahtani allegedly later told the source that he no longer wanted an AK-47 and wanted a smaller gun for protection.

Alqahtani's girlfriend said the handgun found in the search was hers, but she could not identify its make, model or caliber, according to the criminal compliant.

The FBI agent wrote in the affidavit that she might be conspiring with Alqahtani to conceal his owning a gun. It was unclear Friday night whether she faces charges.

Meyers, the defense attorney, 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, the AP reported.

The U.S. Attorney's office said in a news release that Alqahtani faces up to 10 years in prison if convicted.

Authorities said this week that another man from Saudi Arabia legally bought a gun he used in a Dec. 6 shooting that killed three sailors at a Florida naval base. The man, a member of the Saudi air force, was receiving training at the base.

The FBI said the gunman legally bought the Glock 9 mm handgun in July using a hunting license, which is one of the exceptions under the law. The gunman in that incident was killed by law enforcement, officials said.