DUBAI (Reuters) - An Iranian court has sentenced a graduate student from Princeton University to 10 years in jail on spying charges, Iran’s judiciary spokesman said on Sunday, the latest case involving dual citizens held on security charges in the country.

FILE PHOTO: Iran's national flags are seen on a square in Tehran, Iran February 10, 2012. REUTERS/Morteza Nikoubazl/File Photo

Xiyue Wang, 37, was accused of “spying under the cover of research,” said Mizan, the Iranian judiciary’s official news site. Wang was born in China but was naturalized as an American citizen.

“This person, who was gathering information and was directly guided by America, was sentenced to 10 years in prison, but the sentence can be appealed,” spokesman Gholamhossein Mohseni Ejei said on state television.

The U.S. State Department accused Iran of fabricating national security-related charges to detain Americans and other foreigners.

“We call for the immediate release of all U.S. citizens unjustly detained in Iran so they can return to their families,” a State Department official said. “All U.S. citizens, especially dual nationals, considering travel to Iran should carefully read our latest Travel Warning‎.”‎

Wang was also active at Princeton’s Sharmin and Bijan Mossavar-Rahmani Center for Iran and Persian Gulf Studies, which Mizan said has links to Western intelligence agencies and Israel.

“The American spy arrested in Iran was also at the center and his mission was to collect confidential information and documents,” Mizan said, adding that he had copied 4,500 documents.

Wang was arrested in July 2016 as he was trying to leave Iran “after he became nervous about his situation”, Mizan said.

He is a doctoral candidate at Princeton, specializing in late 19th and early 20th century Eurasian history and was in Iran to research the late Qajar dynasty, the school said.

“We were very distressed by the charges brought against him in connection with his scholarly activities, and by his subsequent conviction and sentence,” Princeton said in a statement. “His family and the university are ... hopeful that he will be released after his case is heard by the appellate authorities in Tehran.”

Iran’s 2015 nuclear deal with world powers lifted most international sanctions and promised Iran’s reintegration into the global community in exchange for curbs on its nuclear program.

The potential detente with the West has alarmed Iranian hardliners, who have seen a flood of European trade and investment delegations arrive in Tehran to discuss possible deals, according to Iran experts.

Security officials have arrested dozens of artists, journalists and businessmen, including Iranians holding joint American, European or Canadian citizenship, as part of a crackdown on “Western infiltration.”

The arrests have undermined Iranian President Hassan Rouhani’s goals of reviving business and political ties with the West, as well as pushing for more political and social reforms at home, Iran experts and observers said.

Several Iranian dual nationals from the United States, Britain, Austria, Canada and France have been detained in the past year and are being kept behind bars on charges including espionage and collaborating with hostile governments.

According to former prisoners, families of current ones and diplomats, in some cases the detainees are kept to be used for a prisoner exchange with Western countries. In January 2016, the United States and Iran reached a historic prisoner swap deal that saw Iranians held or charged in the United States, mostly for sanctions violations, released in return for Americans imprisoned in Iran.