Aldrich “Rick” Ames was desperate for money. It was the mid-1980s, and the CIA’s senior counterintelligence officer in the Soviet division had also grown disillusioned with his employer and the spy games between the United States and Soviet Union. So, on June 13 1985, inside his Langley office, Ames made a bold decision. He packed up a six-pound stack of documents that showed the case files and cryptonyms of some of the agency’s best Soviet sources, each with code names such as TICKLE, GENTILE, MILLION and JOGGER.

Then, he stuffed the papers into plastic bags, jammed them into his briefcase, walked to an elevator, and walked out the door of the CIA, according to “Betrayal: The Story of Aldrich Ames, An American Spy,” a 1995 book by a team of New York Times reporters. His next stop was the parking lot, where he got in his car, transferred the dossier into a plastic shopping bag, and drove to have lunch with a Soviet official.

“As they dined, the shopping bag sat under the table. It held nothing but the documents — and the soul of a burned-out CIA man,” according to the “Betrayal” authors, who interviewed Ames. ” ‘In a sense, I was delivering myself along with them,’ Ames said. ‘I was saying: Over to you, KGB. You guys take care of me now. I’ve done this. I’ve demonstrated that I’m holding nothing back. You guys take care of me.’ ”

Does the CIA have a modern-day Ames on its hands now? For several years, federal investigators have been trying to determine whether a mole has been responsible for the imprisonment or deaths of the CIA’s network of informants in China. Last week the Justice Department announced the arrest of a former CIA case officer who served in China, Jerry Chun Shing Lee, 53, a naturalized U.S. citizen who left the agency in 2007 and is a suspect in the China investigation.

So far, he has been charged only with unlawful possession of classified information, keeping notebooks filled with the true names and phone numbers of assets and covert CIA employees in an undisclosed country. But Lee’s arrest — and the glaring possibility of a mole deep in the heart of Langley — resurfaced memories of Ames, the agency’s most notorious turncoat.

The investigations into both men share a similar thread: Their bank activities made them suspicious. Lee received hundreds of thousands of dollars “in unexplained bank deposits,” the New York Times reported Wednesday.

Back in 1985, the CIA was beside itself. A disturbing number of its well-placed sources in the Soviet Union were vanishing. Had a mole infiltrated Langley? Was Moscow stealthily intercepting agency communications? On the surface, relations between the country were far from perfect, but they were improving. The Cold War was thawing. Moscow was embracing a new era of openness and reform, led by Mikhail Gorbachev, the new General Secretary of the Communist Party.

By 1986, the CIA assembled a five-person team to investigate.

It would take years for the team to finger Ames, who began his career at the agency in 1962 as a clerk and eventually reached case officer status.

In the early 1980s, he found himself perched atop the Soviet Counterintelligence Branch in the Soviet/East European division, an inner sanctum of Langley’s most secret secrets. In that role, he had to assess information from Soviet assets and analyze the personal histories of Soviet intelligence officers recruited by the CIA. In other words, anyone in that job would be a highly attractive KGB recruit.

Ames, who apparently drank too much after work, struggled to recruit his own foreign agents. His evaluations even noted that he needed to tend more to his personal hygiene — his teeth were rotting and he wore “slovenly clothes,” according to “Betrayal.”

It was shortly after this time, in early 1985, when Ames began to flip, according to a jailhouse interview he (shockingly) conducted with Washington Post national security reporter Walter Pincus, right after pleading guilty in 1994. Ames told The Post that he was suffering pressing financial problems and needed money. So, he turned to the Soviets. In 1985, he gave them the names of two KGB officers who may have defected. The Soviets showed their gratitude with a payment of $50,000.

“[I] was one of the most knowledgeable people in the intelligence community on the Russian intelligence service. And my access to information and my knowledge of the Soviets was such that I could get virtually anything I wanted,” Ames told The Post.

Ames liked the quick money so much that he made what he described as a “fundamental shift in loyalty” and gave the KGB “the keys to the kingdom” — the list containing the names of all Soviet agents he knew were working for the CIA, the FBI and other nations’ intelligence services.

The treasure trove, delivered over lunch to a Soviet official, led to a huge windfall. A Soviet contact wrote him a message saying that $2 million had been set aside for him. Soon, he began collecting his prize in small increments, according to his interview.

“I was surprised and shocked at the magnitude of that,” Ames told The Post. Now, he reasoned, he could have a child with his second wife, Maria del Rosario Casas. “In addition to this whole financial thing, [the Soviets] had put a little marker down in terms of mutual confidence and loyalty.”

But the Soviets’ disbursements came with warnings, Ames said. His handlers, he told The Post, “agonized over every nickel they handed out, pleading and repeating and reiterating: ‘Be careful, be careful. This is the way that people get caught.’ ”

In his own mind, he justified his treachery as a means of “leveling the playing field” and “that within the American intelligence community, we knew damn well that the KGB wasn’t going to town on us,” he told The Post.

Ames continued his secret life even while he was stationed in Rome in 1986. A few years later, Ames and his wife moved back to the United States, where he bought a $540,000 house in Arlington, Va. (Real estate websites say the home is now worth nearly double that amount.) Once they settled into their home, they continued to spend. A new kitchen. Lavish landscaping. New window treatments across the whole house, all at once. Ames even purchased a new Jaguar.

The CIA’s small squad of investigators hadn’t given up — and they took notice. They reviewed his finances but didn’t immediately find a smoking gun. Everyone they interviewed said his wealth came from his wife’s Colombian family, according to “Circle of Treason,” a book on the Ames scandal by Sandy Grimes and Jeanne Vertefeuille, two of the CIA officers on the team and close friends.

It wasn’t until the summer of 1992 when the CIA team got the goods. Grimes examined the timing of a series of Ames’s bank deposits from 1985 and his sanctioned meetings with a Soviet arms control specialist. She noticed a pattern: He’d have lunch with the Soviet one day, and the same or the next day, he’d deposit sizable amounts of cash, from $5,000 to $9,000.

“To Sandy this was an epiphany,” according to “Circle of Treason.” “She told us what she found, then sped to [another investigator] to fill him in. Her excited announcement to him was: ‘It doesn’t take a rocket scientist to tell what is going on here. Rick is a goddamn Russian spy.’ ”

By 1994, fearing that Ames was about to flee the United States, the FBI arrested him a few blocks from his house. Two months later, he and his wife pleaded guilty to charges of conspiracy to commit espionage and tax fraud. Ames was sentenced to life in prison, while his wife, who pleaded guilty to a lesser version of the espionage charge, got five years. As part of the deal, Ames had to help the CIA uncover the full extent of damage he had inflicted.

The most valuable spy killed because of Ames’s disclosures was a Soviet military intelligence officer Gen. Dimitri Fedorovich Polyakov, whose code name was “Tophat.” The general supplied the CIA with the names of Soviet spies in the United States, as well as data on Soviet missiles and nuclear war strategy.

The full extent of Ames’ damage may never be known. Vertefeuille gave an interview in 1997, saying that Ames furnished the Soviets with the names of “hundreds” of foreign agents working for the United States around the world. Investigators believe Ames was paid in the millions.

In his Pennsylvania prison cell, Ames kept busy. He agreed to lengthy interviews, but maybe his most bizarre act was that he once moonlighted as a literary critic. He’d gotten his hands on a novel called “Sleeper Spy” by William Safire, the now- deceased New York Times columnist, according to a Washington Post account. He wrote up a review and passed it onto his lawyer, Plato Cacheris, who happened to be friends with Safire, and who would later go on to defend former FBI agent-turned-Russian mole Robert Hanssen. The CIA, amazingly, gave Ames the green light and allowed him to publish it. Safire told Cacheris to fax over the review to Safire’s friend, the publisher of the Hill newspaper. And the Hill ran it.

An excerpt of the review still exists on the website of the Baltimore Sun. Say what you want about Ames, the double agent had high literary standards.

“Since the preposterous plot is not meant to be taken seriously, even by the characters who struggle in its contradictory meshes, Safire concentrates his considerable energies on stuffing their mouths with knowing references to journalism, publishing, high finance, the CIA and KGB,” Ames wrote. “One hinge of his plot involves the workings of presidential covert-action findings, no very mysterious process, but one that Safire is determined to get wrong . . . His ignorance might serve an op-ed man well, but it’s of no help to a novelist.”

Read more Retropolis: