The arrest last week of a former CIA officer suspected of spying for China exposed one of the most significant intelligence breaches in American history. But the damage is even worse than first reported, sources familiar with the matter tell NBC News.

A secret FBI–CIA task force investigating the case concluded that the Chinese government penetrated the CIA's method of clandestine communication with its spies, using that knowledge to arrest and execute at least 20 CIA informants, according to multiple current and former government officials.

American officials suspect China then shared that information with Russia, which employed it to expose, arrest and possibly even kill American spies in that country, said the current and former officials, who declined to be named discussing a highly sensitive matter. The possible sharing with Russia has not previously been reported.

Those sobering findings, sometime after the inquiry began in 2012, led the CIA to temporarily shut down human spying in China, and to overhaul the way it communicates with its assets around the world, according to former government officials familiar with the case.

It was a shocking blow to an American spy agency that prides itself on its field operations. There was also a devastating human cost: Some 20 CIA sources were executed by the Chinese government, two former officials said — a higher number of dead than initially reported by NBC News and the New York Times. Then an unknown number of Russian assets also disappeared, sources say.

Eventually a top secret joint FBI-CIA task force investigation led authorities to suspect that former CIA case officer Jerry Chun Shing Lee had been spying for China. Lee, 53, was arrested this week and charged, not with espionage, but with a single count of possessing classified information.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

U.S. officials told NBC News they don't believe Lee ever will be charged as a spy, in part because they don't have all the proof they might need, and in part because they would not want to air the evidence they do have in a public courtroom.

FBI agents began to suspect Lee after they received a tip that he had passed information to Chinese intelligence officers while working for a Japanese tobacco company in Hong Kong, sources said, a detail first reported Thursday by the New York Times. They also found it suspicious when Lee took a job at an auction house in Hong Kong that was co-owned by a senior Communist Party official, sources said. He eventually ended up working for Christie's, the international auction house.

When agents searched Lee's hotel rooms in 2012, they found notebooks with the names of covert CIA sources, according to court documents.

But not all of the agent arrests and deaths could be linked to information possessed by Lee, who left the CIA in 2007, the former officials said.

A man (right, wearing blue tie) identified by local Hong Kong media as former CIA agent Jerry Chun Shing Lee stands in front of a member of security at the unveiling of Leonardo da Vinci's 'Salvator Mundi' painting at the Christie's showroom in Hong Kong on on Oct. 13, 2017. Anthony Wallace / AFP - Getty Images file

"No single officer had access to all of them," one official said.

Investigators soon began to conclude that its communications system for covert communications, referred to as "covcom," had been infiltrated. One theory is that Lee may have helped the Chinese do that. But two former officials said the CIA's system for exchanging messages with its agents was shockingly primitive and subject to easy penetration by the Chinese.

"All they had to do was get one agent's laptop, and they could figure it out," one former official said.

Soon after the task force concluded the Chinese had penetrated covcom, it got an even more troubling report: That after a joint training session between Chinese and Russian intelligence officers, the Russians "came back saying we got good info on covcom," as the former official put it.

Investigators began examining cases of U.S. assets in Russia who had disappeared. Officials concluded they had to change their system for agent communications.

Eventually, Mark Kelton, the CIA's top counterintelligence official, had to brief the leaders of the House and Senate intelligence committees on the damage, some of whom vented their fury behind closed doors. But few others were aware of it, even within the confines of the CIA and FBI. The New York Times reported on the case last year, including the detail that authorities suspected a former CIA officer living in an Asian country.

Last week, for reasons that still are not clear, Lee flew from Hong Kong to New York, where he was met by an FBI team.

The CIA declined to comment, as did Kelton, who was the top counterintelligence official at time.

Ed O'Callaghan, a senior prosecutor in the Justice Department's National Security Division, called Lee's capture "a very important arrest." During an unrelated appearance at the White House earlier this week, he said that although Lee was charged with illegally retaining classified information, "As that case proceeds through the courts, I would expect that more information about the conduct that underlies those charges and the complaint will come out."

Lee appeared briefly in a Brooklyn federal courtroom Monday after his arrest at JFK airport. As early as next week, he will be brought to a courtroom in Alexandria, Virginia, where he will be formally prosecuted, officials said.

Lee's attorney declined to comment.