Former CIA operations officer Jerry Chun Shing Lee pleaded guilty on Wednesday to conspiracy to commit espionage for China in a case linked to the loss of numerous recruited CIA spies in China.

Lee, 54, a naturalized U.S. citizen living in Hong Kong, supplied documents and information to Chinese intelligence officers from April 26, 2010, to Jan. 15, 2018 when he was arrested, according to court papers in the case.

The former spy handler initially had pleaded not guilty. The plea deal avoids what was expected to be a lengthy trial that may have risked further exposing CIA secrets Lee supplied to China.

Lee faces a maximum sentence of life in prison for the charge. Sentencing in the case was set for Aug. 23.

The case is one of three Chinese espionage-related cases in recent months as part of a Trump administration crackdown on Beijing's intelligence operations.

G. Zachary Terwilliger, U.S. attorney for the Eastern District of Virginia, said Americans entrusted with the government’s most closely held secrets have a tremendous responsibility to safeguard secret information.

"Instead of embracing that responsibility and honoring his commitment to not disclose national defense information, Lee sold out his country, conspired to become a spy for a foreign government, and then repeatedly lied to investigators about his conduct," Terwilliger said in a statement announcing the plea deal.

"This prosecution should serve as a warning to others who would compromise our nation’s secrets and betray our country’s trust."

Edward MacMahon, Lee's lawyer, declined to comment on the case.

Lee was recruited by the Chinese Ministry of State Security during a 2010 meeting in Shenzhen, China. At the meeting, two MSS officers offered him money in exchange for secrets. The MSS officers told Lee "they had prepared a gift of $100,000 cash and that they would take care of him ‘for life' in exchange for his cooperation," a statement of facts in the plea deal states.

Beginning after the meeting, Lee received requests for information from the MSS that included revealing "sensitive information about the CIA, including national defense information."

A document Lee created for the MSS described locations used by the CIA to assign case officers, and also the location of a sensitive CIA operation.

However, the most damaging information was uncovered during an FBI search of Lee's hotel room in Honolulu in 2012. Two notebooks included notes identifying "intelligence provided by CIA assets, true names of assets, operational meeting locations and phone numbers and information about covert facilities." The information was classified at the secret level.

"As the defendant well knew, many of these entries were classified up to the secret level and contained national defense information of the United States," the statement of facts said.

Around the same time in 2010, the CIA began losing large numbers of recruited agents in China many of whom were arrested, imprisoned or executed in one of the worst intelligence failures in the agency's history.

A former high-ranking intelligence official said the agent losses were blamed on a combination of a compromised CIA communications system used to communicate covertly with recruited agents and the betrayal by a Chinese mole with access to secrets about the agent network.

Many counterintelligence officials believe Lee was one such mole, based on his spying for the MSS and the notebooks containing recruited agents' names and identities.

The plea deal and statement made no mention of the agent losses or whether Lee was the cause.

The loss of the Chinese agent network was the target of a major CIA and FBI counterintelligence investigation.

According to the court statement, Lee at first denied to the FBI that he had written notes identifying the Chinese agents, until he was shown copies of the notes obtained covertly by the FBI.

Lee left the CIA in 2007 and moved to Hong Kong where he started a business involved in cigarette imports to China.

He later sought to rejoin the CIA in an apparent bid to regain access to secrets on behalf of the MSS.

Lee had been under FBI surveillance since 2012 and the investigation of his spying activities continued until his arrest in 2018.

He joined the CIA in 1994 and was posted in China and other locations around the world. His recruitment by the MSS involved working in the Hong Kong business with a former Hong Kong police officer that the statement said was linked to the MSS and who arranged the recruitment meeting in Shenzhen.

"This is the third case in less than a year in which a former U.S. intelligence officer has pled or been found guilty of conspiring with Chinese intelligence services to pass them national defense information," said Assistant Attorney General for National Security John C. Demers. "Every one of these cases is a tragic betrayal of country and colleagues."

The two other cases of intelligence officials who spied for China include former Defense Intelligence Agency officer Ron Hanson, who pled guilty to spying for China in March, and former CIA officer Kevin Mallory, who was found guilty of espionage in June 2018.

"By knowingly aiding a foreign government, Mr. Lee put our country’s national security at serious risk and also threatened the safety and personal security of innocent people, namely his former intelligence colleagues," said FBI Assistant Director for Counterintelligence John Brown. "He deserves to answer for his treachery."

Former State Department officer manager Candace Claiborne pleaded guilty to spying for China since 2007, providing internal information in exchange for cash.