Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A Northern California man who was charged with acting as an agent of China's government and arrested as part of an FBI sting operation was sentenced to four years in prison Tuesday, federal prosecutors said.

Xuehua "Edward" Peng, who arrested last year, was caught acting as a courier for China's Ministry of State Security (MSS) after the U.S. launched a "double agent operation" in 2015, according to a criminal complaint filed in the case.

Peng, 56, of Hayward, pleaded guilty to acting as an agent of a foreign government without notice to the attorney general on Nov. 25, the U.S. Attorney’s Office for the Northern District of California said in a statement.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Download the NBC News app for breaking news and politics

Peng is a naturalized U.S. citizen from China, and he admitted as part of a plea agreement that he was approached by an official from the People’s Republic of China while on a business trip in China in March 2015, prosecutors said.

That official wanted Peng to help the Chinese government by using his U.S. citizenship, and Peng agreed even after coming to understand that the official was working with that country’s Ministry of State Security, prosecutors said.

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 at hotels in California and Georgia, the criminal complaint says. In four of the cases, the parcels contained secure digital memory cards containing classified information, and Peng left behind a total of $70,000 for the source who dropped them off, the complaint says.

U.S. Assistant Attorney General of National Security John C. Demers said in a statement Tuesday that the case exposed how Chinese intelligence services work to get classified information from the U.S., and that it was just one example of what he called "the Chinese government’s multi-faceted espionage efforts."

Peng was also sentenced to pay a fine of $30,000, the U.S. attorney's office said. Peng admitted to being paid at least that much by the PRC official to act as a courier.