A former CIA officer was found guilty of espionage, on behalf of China, and lying to the FBI about communication with Chinese officials, the New York Times reports. The officer, Kevin Mallory, faces life in prison following the verdict.

The intrigue: Per the times, the prosecution called his story "totally and completely absurd," explaining that he "selectively disclosed his contacts in order to have a potential defense in case federal investigators caught on to his true plan: to trade American secrets for cash." However, Mallory’s lawyers persistently denied the charges claiming that he is "a former C.I.A. clandestine officer and a private consultant, is a patriot who planned to use his recruitment to lure Chinese intelligence handlers into the C.I.A.'s grasp."

The gritty details: Mallory was contacted by a Chinese headhunter in early 2017 to do contracting work for a networking site. The Times details that Mallory, who is fluent in Mandarin Chinese, "was passed to a Chinese intelligence operative working for a think tank who wanted him to become an informant." He then traveled to Shanghai, "had covert communications with the operative on a Chinese-provided phone and passed information — including an unclassified white paper on American intelligence policy — to his handlers," per the Times, citing authorities.

"But Chinese attempts to protect the contents of the phone from prying eyes failed because of an apparent technical problem," per the Times. Adding that "the F.B.I. was able to analyze it and found a handwritten index describing eight documents. Four of the documents listed in the index were found on the phone, with three containing classified information."

One key twist: He reportedly "told the F.B.I. and the C.I.A. parts of the story and provided his phone to agents. This was evidence that Mr. Mallory was not a spy, his lawyers said."

What they're saying: G. Zachary Terwilliger, the United States attorney for the Eastern District of Virginia told the Times: "There are few crimes in this country more serious than espionage... This office has a long history of holding those accountable who betray their country and try and profit off of classified information."