Former CIA officer Jerry Chung Shing Lee pleaded guilty of conspiracy to commit espionage for China at a court in Virginia on Wednesday.

Some intelligence officers suspect the U.S. Army veteran and Hong Kong native compromised CIA sources in China, leading to the collapse of the agency’s network there, reports the Washington Post. Several CIA agents were killed as China pushed the agency out of the country.

“Lee sold out his country, conspired to become a spy for a foreign government, and then repeatedly lied to investigators about his conduct,” said G. Zachary Terwilliger, U.S. Attorney for the Eastern District of Virginia, reports the Post.

Lee, 54, left the CIA in 2007 after 13 years of service. He was approached by Chinese intelligence officers in 2010 while living in Hong Kong, according to a Department of Justice press release. In exchange for information he had gained while working as a CIA case officer, the Chinese officers offered him $100,000 and said they would take care of him “for life.”

Lee received multiple requests for information between May 2010 and at least 2011 and deposited hundreds of thousands of dollars into his bank account between May 2010 and December 2013, according to the DoJ.

The FBI became suspicious of Lee after receiving information from an informant in China, according to the Post. They got him to return to the U.S. in 2012 by offering him the chance to re-join the CIA. When law enforcement searched his Honolulu hotel room, they found a thumb drive containing a document detailing a secret CIA operation and notebooks with the real names and phone numbers of operatives and details about secret facilities written in them, according to the Post.

The CIA interviewed Lee multiple times during 2012, during which he did not disclose that he had received requests from Chinese intelligence agents. In 2013, the FBI also interviewed him multiple times. During one he admitted that he had received tasks from China. He also denied knowledge of the thumb drive and document found in his hotel room, before later admitting that he created the document but had not passed it on. In further interviews, Lee changed his story several times.

“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 John Brown, Assistant Director for Counterintelligence for FBI, according to the Department of Justice.

He was arrested in 2018, and faces up to life in prison, but is likely to receive less time because he admitted to disclosing “secret” not “top secret” information to the Chinese, according to the Post. His sentencing is set for August.

Write to Amy Gunia at amy.gunia@time.com.