Prosecutors showed the interrogation video of an ex-CIA officer accused of espionage in court Friday.

Prosecutors say 61-year-old Kevin Mallory of Leesburg, Virginia, sold secret documents to the Chinese for $25,000 last spring. Mallory claims his meeting with the Chinese was about his consulting business.

During the interrogation, Mallory explained to investigators his consulting work with Chinese researchers, which is how Mallory said they represented themselves to him.

“And they said, kind of words to the fact that, ‘Well, if we were the government, would that make a difference?’ kind of thing,” Mallory told investigators. “I said, ‘Well, if you are the government, OK, it doesn’t make a difference to me, but what are we consulting on?’”

The prosecution’s evidence includes a cellphone that Mallory told investigators the Chinese gave to him for when they had important things to talk about. Prosecutors believe it was used to transmit top secret documents.

“They said, ‘Yeah, but this is a better way that way if we need to communicate with you information or vice versa you have something really important than you can talk with us about it,’” Mallory told investigators.

FBI agents say they found incriminating exchanges, including one with Mallory writing to the Chinese, “I am taking the real risk,” and later sending this message, “Your object is to gain information, and my object is to be paid for.”

Mallory told investigators he had nothing of value to offer them.

“At this point, they know I don’t have access,” Mallory said. “I don’t have access physically to somebody. I don’t have access to a classified environment.”

In court documents, Mallory’s defense argued that he never gave anything of value to the Chinese, adding that he was engaging with them to get information on their intelligence operations.

Mallory was working as a self-employed consultant when he returned from Shanghai with more than $16,000 in undeclared cash.

Mallory had grown suspicious about a Chinese think tank's job offer and hatched a plan to feed them phony documents, the defense said in opening statements Wednesday. He told people at the CIA, but prosecutors said that was just to cover his tracks.

Mallory's scheme unraveled when he was selected for secondary screening at O'Hare Airport in April 2017 on a flight back from Shanghai with his son, the prosecution told jurors Wednesday. There customs agents found $16,500 in unreported cash, and they questioned Mallory about the nature of his trip.

The customs agents allowed Mallory entry after assessing a $188 tariff on some electronics Mallory said he had purchased. But the prosecution said the encounter prompted Mallory to reach out to some old CIA contacts to concoct a cover story for his espionage.

The defense said Mallory reached out to his old CIA contacts months before he was supposedly spooked by the airport inspection. During testimony Wednesday, a CIA analyst and a CIA contractor testified Mallory contacted them in February 2017, two months before the Shanghai flight. One of the two testified that Mallory wanted him to reach out to China contacts in the CIA because he was concerned that the think-tank offer was not on the level. The other testified that he could not recall exactly why Mallory reached out.

“The only reason we are sitting in this courtroom is Mr. Mallory knocked on the front door of the CIA” to tell them about the offer he received from the Chinese.

Agents searched Mallory's home and found two small computer discs — one balled up in tin foil in a closet box filled with junk.

The drives contained secret and top-secret documents, some of which had been sent to the Chinese recruiter on that Samsung phone, according to the prosecution. One document contained information about human assets.

The trial being heard in the Eastern District of Virginia is rare, as both sides in espionage cases have strong incentives to reach plea deals. The government is concerned about exposing secrets, while defendants are worried about potentially stiff sentences.

The prosecution continues its questioning next week. Then it is the defense’s turn.

Mallory faces up to life in prison.