A former CIA officer accused of spying for China had notes in his home that could have gotten clandestine sources killed, according to prosecutors in Alexandria federal court.

While Kevin Mallory is not accused of handing those documents over to Chinese intelligence agents, prosecutors noted his access to the material to underscore the seriousness of potential breaches and to argue that he should remain jailed pending trial on espionage charges. A federal judge agreed.

Mallory, a 60-year-old from Leesburg, Va., is accused of handing over classified documents revealing details of CIA intelligence.

On a phone that Mallory admitted was given to him by someone he thought worked for Chinese intelligence, eight documents were found, authorities said. Six were classified CIA documents and one was a classified Defense Intelligence Agency document, FBI agent Stephen Green testified Friday. The last is a mix of typed and handwritten pages that are still being reviewed.

At least two of the documents were transmitted to the Chinese earlier this year, according to prosecutors.

A magistrate judge last week ordered Mallory’s release on a $10,000 bond. But U.S. District Judge T.S. Ellis overturned that decision Friday, in part based on the new details revealed regarding Mallory’s CIA career and the documents found in his possession.

Prosecutors confirmed in court Friday that Mallory worked for both the CIA and the Defense Intelligence Agency, the CIA’s counterpart in the Defense Department.

According to court documents, Mallory was a covert CIA case officer from 1990 to 1996 and a CIA contractor from 2010 to 2012. It was not clear when he worked for the DIA.

Antoinette Shiner, an information review officer for the CIA, confirmed in a declaration filed in court Friday that Mallory’s documents contained sensitive CIA intelligence, analysis of that intelligence and, in some instances, the actual human or technical sources of the intelligence.

One of the documents he is alleged to have passed on to the Chinese “reveals the breadth and depth” of the CIA’s understanding of “a specific hostile foreign intelligence service,” according to Shiner, including details on that foreign service’s approach to counterintelligence.

Handwritten notes found in Mallory’s house, she said, concern sensitive human sources and “could reasonably be expected to cause the loss of critical intelligence and possibly result in the lengthy incarceration or death of clandestine human sources.”

According to the criminal complaint against Mallory, he told the Chinese operatives that he had notes to offer as well as documents.

Mallory is not accused of selling intelligence that led to the death of any U.S. officer. If he were, he would be facing the death penalty. Instead he could be sentenced with up to life in prison, if convicted.

Prosecutors also played in court a phone call from jail in which Mallory asked his wife and son whether a particular memory card had been seized by FBI agents. The card had been seized, and the eight documents were on it. It was found wrapped in foil inside a shoe in Mallory’s closet, according to Assistant U.S. Attorney John Gibbs.

At the end of the call, Mallory says it’s “good” that agents found the card and that he had merely hoped to give it to his lawyer first so he would know it hadn’t been tampered with in some way.

Prosecutors have repeatedly emphasized that wigs, fake scar liquid and other disguise makeup were found in Mallory’s bedroom closet. Defense attorney Geremy Kamens said the items are given to every CIA officer who trains for clandestine service and that they were over a decade old. In recent years, he said, Mallory had used them only on Halloween.

Kamens pointed out that Mallory repeatedly reached out to his former CIA colleagues about his contact with the Chinese agents, even before the first of his two trips to China this spring. It was after his second trip that Mallory was caught lying to Customs agents about how much money he was carrying home.

Kamens suggested Chinese intelligence runs “a very sophisticated organization” and could have put the classified documents on the phone themselves in hopes of “blackmailing him so they could obtain information in the future.” He also implied, in Ellis’s words, that Mallory was working as a freelance “double agent,” aiming to expose Chinese attempts at espionage.

The judge was not persuaded by either suggestion, noting that according to the criminal complaint Mallory was paid $25,000 by the Chinese.

While the Chinese operatives represented themselves as working for a Shanghai think tank, according to the complaint, Mallory told FBI agents he believed they were intelligence agents. The think tank, the Shanghai Academy of Social Sciences, functions as both a legitimate academic institution and a cover for Chinese intelligence officers, according to the FBI.

“He’s cleverer than most,” Ellis said. By going to the CIA at the same time, “he’s trying to make sure he has a way out.”

He ruled that Mallory was both a flight risk and a danger to the community, because he might trade the rest of his intelligence for help getting out of the country.

The Chinese, Ellis said, “would love to have him so they could drain him of information and make sure he doesn’t talk very much.”