A California man has been charged with acting as an illegal foreign agent as part of an elaborate FBI sting operation targeting Chinese intelligence operatives working in the U.S., the Justice Department said Monday.

Xuehua "Edward" Peng was caught acting as a courier for China's Ministry of State Security (MSS) after the U.S. launched a "double agent operation" in March 2015, according to a criminal complaint filed in the Northern District of California and obtained by NBC News.

As part of the investigation, a confidential FBI source — the "double agent" — met with MSS intelligence officers, provided them with classified information relating to national security concerns, and received financial payments in return, the criminal complaint says.

On six occasions, Peng showed up to collect packages left at hotels in California and Georgia, the criminal complaint says. In four of the cases, the parcels contained secure digital (SD) memory cards containing classified information, and Peng left behind a total of $70,000 for the source who dropped them off, the complaint says.

Peng, a naturalized U.S. citizen from China, is believed to have been "instructed in spycraft, practiced it, and knew that he was working for intelligence operatives of the People's Republic of China," the complaint says. He was arrested at his home in the city of Hayward last Friday.

"The Chinese are the number one intelligence threat to the United States right now," Assistant Attorney General of National Security John C. Demers told NBC News in an exclusive interview. "No question. The Russians are up there for sure, but the Chinese are number one."

The operation began after a March 2015 meeting in China during which an MSS intelligence officer set up a trial run for passing along classified information that involved placing an SD card in a book, wrapping it in a bag marked for "Ed" and leaving it at the front desk of a hotel in Newark, California.

Peng showed up in a silver Mercedes to collect the empty package on the day of the planned drop-off, June 13, 2015, the criminal complaint says.

Then, on Oct. 8, the source emailed his handler saying he would be traveling to San Francisco for sightseeing on Oct. 24 — a coded message indicating the source would be conducting a dead drop at the same hotel on that day, the complaint says.

The source left a parcel with an SD card for "Ed" with a receptionist at 8:30 a.m. Peng was observed entering the hotel less than an hour later and leaving with the package in hand, the complaint says.

He flew to China the next day but returned to the U.S. and collected other packages at hotels in California and Georgia over the next few years, the complaint says.

The last drop-off took place on June 30, 2018. After a coded conversation with an MSS agent, Peng showed up at a hotel in Columbus, Georgia, where he taped a white envelope containing $20,000 to the shelf of a drawer inside a room, the complaint says.

He left the hotel and drove to a nearby shopping center about 8:30 a.m. Roughly an hour later, the source entered the room, removed the envelope, taped the SD card to the top of the drawer and then left the hotel, the complaint says.

Peng returned to the room, grabbed the SD card and left the hotel. Two days later, the complaint says, his wife dropped him off at the San Francisco International Airport, where he boarded a flight for Beijing.

Peng, who is believed to have been working as a sightseeing tour operator in the San Francisco area for Chinese students and visitors, arrived in the U.S. on a temporary business visa but became a naturalized citizen in September 2012. He has a degree in mechanical engineering and is trained in traditional Chinese medicine, according to the complaint.

Demers said the operation "reads like a good spy novel, because good spy novels reflect reality. ... You have two people both working on behalf of the Chinese intelligence services — or that's what the Chinese intelligence services thought."

Demers called Peng's arrest "a great sting operation."

Asked why authorities developed the case over three full years, Demer said, "You don't want to just watch one dead drop, you want to get a sense of, 'Is this the way that they operate and practice? You want to follow that over time if you can. And in this case you can, because the information that you are giving them is carefully curated."

Following his arrest last week, Peng appeared in court and was ordered held without bond. If convicted, he faces up to 10 years behind bars.

Said Demers, "We certainly want to send a message to anyone else who may be acting in this capacity on behalf of the Chinese government. ... [Y]ou're not safe. You could get caught. In fact, Chinese intelligence [is] putting you at risk. "