CHICAGO — A Chinese citizen living in Chicago was arrested Tuesday for allegedly spying, including by helping with the recruitment of U.S. engineers, defense contractors and scientists for intelligence services in China, federal prosecutors said.

Ji Chaoqun, 27, is charged with one count of knowingly acting in the U.S. as an agent of a foreign government without prior notification of the attorney general, a statement from the U.S. attorney's office in Chicago said. He allegedly worked at the direction of high-ranking intelligence officials with the People's Republic of China and was given the task of providing information about eight people for possible recruitment.

Ji made an initial appearance in federal court in downtown Chicago, looking tired and fidgeting as he stood before U.S. Magistrate Judge Michael T. Mason. Ji huddled with a Chinese-language interpreter for much of the 15-minute hearing. But when the judge asked if he understood his rights, Ji lifted his head and said in English: “I understand.”

Assistant U.S. Attorney Shoba Pillay said at the hearing that Ji faces up to 10 years in federal prison if convicted on the one count.

Through a lawyer, Laura Hoey, Ji also asked that the Chinese consulate be notified about his arrest. Judge Mason ordered that Ji remain in custody for now, and U.S. Marshal's agents handcuffed him and led him away. No additional hearings were immediately set.

A 17-page criminal complaint says Ji came to the U.S. in 2013 on a student visa to study engineering at the Illinois Institute of Technology in Chicago. He enlisted in the U.S. Army Reserves in 2016 under a program that allows some immigrants living in the country legally to serve in the military if their skills could be vital to U.S. interests.

There was no answer at a number for the Chinese consulate in Chicago on Tuesday evening.