A former CIA officer accused of spying for China has been sentenced to 20 years in prison.

Kevin Mallory, 62, of Leesburg, Virginia had been charged with attempting to expose agents that were at one point his responsibility and spying for China through providing classified information in exchange for cash.

Mallory was caught at Chicago's O’Hare International Airport on a return flight from Shanghai, when customs agents found $16,500 (£13,000) in undeclared cash in one of his bags in April 2017.

He voluntarily cooperated with authorities, but reportedly was shocked when a “secure” phone given to him by his Chinese handler displayed messages between Mallory and his recruiter, including one which said: “Your object is to gain information, and my object is to be paid.”

“At its heart, this was a very basic crime,” said prosecutor John Gibbs at Mallory’s sentencing hearing.

The art of industrial espionage Show all 3 1 /3 The art of industrial espionage The art of industrial espionage pg-46-espionage-getty.jpg Getty Images The art of industrial espionage pg-46-spy-2-james.jpg Alexander James The art of industrial espionage pg-46-spy-3.jpg

“He was desperate for money, and the most valuable thing he had was our nation’s secrets.”

Prosecutors alleged Mallory intended to send information that may have led to the exposure of “human assets” described in court as “the Johnsons”. Mallory was the Johnsons’ handler when he worked at the CIA.

Mallory’s lawyers claimed he never intended to send the information, citing electronic forensic evidence that supported their claim.

Judge Ellis, who presided over the case, ruled that he was not able to “conclusively determine” that Mallory intended to send information that would compromise the Johnsons, though he suspected the “long-term intentions” were sinister.

Support free-thinking journalism and attend Independent events