WASHINGTON — A former C.I.A. case officer faces life in prison after he was convicted on Friday of betraying his country to spy on behalf of China.

Kevin Mallory, 61, of Leesburg, Va., was found guilty of espionage charges and lying to the F.B.I. about his contacts with Chinese intelligence.

The verdict capped a nearly two-week trial that offered a rare glimpse into the murky world of American espionage cases, which typically do not go to trial because of the difficulties involving highly classified information.

“There are few crimes in this country more serious than espionage,” said G. Zachary Terwilliger, the United States attorney for the Eastern District of Virginia. “This office has a long history of holding those accountable who betray their country and try and profit off of classified information.”