If he had done so, “we are willing to show our gratitude and respect for his service to our country”, said an editorial in the Global Times, a nationalistic newspaper with close ties to the ruling Communist Party.

“On the secret battlefield without gunpowder, China needs special agents to gather secrets from the US,” it added.

But it also questioned whether the plea agreement reflected the truth of the matter, saying that while the US has arrested “quite a few ‘Chinese spies’… most of them proved to be innocent”.

“As the ‘war of information’ between China and the US continues”, it said, “there will probably be more Chinese framed as spies.”

Washington and Beijing have repeatedly clashed over what the US describes as rampant cyberspying by the Chinese government on US industry.

Last year, the US indicted five Chinese military officers on charges of cyberspying.

In the 1990s, Taiwanese-American Wen Ho Lee was accused of spying for the Chinese government, but eventually pleaded guilty to only one minor charge in an embarrassing debacle that ended in an apology from then US president Bill Clinton.

Chinese-born US citizen Chi Mak was jailed for 24 years in 2008 for conspiring to smuggle sensitive US submarine technology to China.