A former defense and intelligence contractor who sold classified documents to the Chinese government, and then claimed that he was actually working a reverse sting to expose Chinese spying methods, was sentenced Friday to 20 years in prison for delivering U.S. secrets to a foreign government. 

Kevin P. Mallory, 62, of Leesburg, Va., is an Army veteran who also worked for the Central Intelligence Agency and the Defense Intelligence Agency, and had a top-secret security clearance until he stopped working as a CIA contractor in 2012. He then launched his own consulting business.

But five years later, Mallory’s business was failing, and prosecutors said he was in danger of losing his $900,000 home in Leesburg. In February 2017, he was contacted on the social networking site LinkedIn by a recruiter for the Shanghai Academy of Social Sciences, a think tank that prosecutors believe is a front for Chinese spy activity.

Mallory then made two trips to China, was given a modified mobile phone by Chinese officials to conduct secret chats, and was paid a total of $25,000 in cash in exchange for documents, the evidence showed. The government said eight of those documents contained classified information, though it was not clear whether six of them were ever actually sent.

“Your object is to gain information, and my object is to be paid for it,” Mallory said in one message to the Chinese, according to court filings.

Then in May 2017, Mallory approached the CIA to tell the agency about his operation, saying he was being recruited by Chinese intelligence. He turned over the modified mobile phone, where the FBI found his messages with the Chinese. Mallory claimed he had handed over only two “essentially worthless” unclassified white papers on policy in exchange for the $25,000, his lawyers said. Prosecutors said that the documents were considered secret and related to Americans working undercover for the CIA, and that Mallory had once been their handler.

Prosecutors noted that Mallory had previously been accused of sharing classified information with a defense contractor in 2010, while trying to start his consulting business, and his security clearance was revoked.

Mallory’s lawyers argued in a sentencing brief that he “provided extremely valuable intelligence to the United States, namely a Samsung cellphone containing a covert communication application used by Chinese intelligence.” They said the value of what Mallory provided to the United States far exceeded the value of what he provided to the Chinese, and the courtroom was then closed Friday to allow both sides to discuss that information in detail, though members of the CIA, the DIA and the FBI were allowed to remain.

Mallory spoke only briefly Friday in federal court in Alexandria. “My love for my country has never wavered,” he said. “I love my family very deeply.” His attorneys had advised him not to discuss the case itself pending an appeal.

Mallory was arrested in June 2017 and elected to take his case to trial, which was closely watched by representatives of several intelligence agencies. In June 2018, a jury convicted Mallory on all four espionage counts presented by the government. 

U.S. District Judge T.S. Ellis III then dismissed two of the counts involving the actual delivery of the documents, because prosecutors hadn’t proved that Mallory was within the Eastern District of Virginia when the documents were sent. But his conviction on a charge of conspiracy to gather or deliver defense information to aid a foreign government remained.

Voluntary federal sentencing guidelines called for a life sentence for Mallory. But Ellis said he didn’t impose that because no intelligence assets were revealed to the Chinese. 

“If I had concluded that sources had been compromised,” the judge said, “I would impose a far more severe sentence.”

Ellis said he imposed 20 years, plus a concurrent five-year sentence for lying to the FBI, to send a message that “if you choose to play footsie with another country, and give information to another country, you have made a decision to commit a crime.”

Mallory is one of three former intelligence officers charged in recent years with helping China.

Jerry Chun Shing Lee, a former CIA case officer long suspected in the intelligence community of being a mole for the Chinese government, pleaded guilty this month in Virginia and will also be sentenced by Ellis. Ron Rockwell Hansen, a former DIA officer, pleaded guilty in Utah in March in connection with his attempted transmission of defense information to China.

“Unfortunately, this case is not an isolated incident,” Assistant Attorney General John C. Demers said after Mallory’s conviction last year. “The Chinese government is a sophisticated and determined adversary.”