(CNN) Former CIA case officer Jerry Lee pleaded guilty Wednesday to charges that he conspired to commit espionage on behalf of the Chinese government.

The change of plea came as a trial was set to take place in Virginia federal court that would have seen Lee defending himself against additional, serious charges.

"I conspired to gather and send secret level information to PRC," Lee, a 13-year veteran of the US spy agency, told Judge T.S. Ellis III, referring to China.

Lee's attorney, Edward B. MacMahon, has maintained that Lee is not a Chinese spy, and Lee was not accused of actually sending any state secrets to the Chinese.

Court documents, however, detail how Lee allegedly maintained communication with two Chinese intelligence officers that would send him envelopes with "taskings," or requests for secret information, in exchange for cash.

Read More