Aldrich H. Ames pleaded guilty yesterday to giving up some of the CIA's most precious secrets, saying he surrendered much of the information without being asked by his Soviet handlers.

In front of a packed courtroom that included his weeping wife, Rosario, and some former CIA colleagues, Ames said in a 15-minute address that he "betrayed a serious trust" but played down the damage caused by his nine years of work as a double agent.

"These spy wars," he said dryly, "are a sideshow which have had no real impact on our significant security interests over the years."

The 31-year CIA counterintelligence officer likened himself to "a corrupt government official receiving a bribe or a stock speculator acting on inside information."

Ames, 52, who was sentenced to life in prison with no chance of parole, said he began aiding the Soviets in April 1985 by giving the KGB the names of two agents whose cooperation with the CIA he suspected was not genuine. In return, he was paid $50,000. A few months later, he said, he delivered a list of every CIA and FBI informer that he knew of, with no demand for money.

"To my enduring surprise," Ames added, "the KGB replied that it had set aside for me $2 million in gratitude for the information."

Prosecutors dismissed Ames's remarks as a self-serving attempt to justify his horrendous criminal behavior. They said he had caused the deaths, arrests and disappearances of at least 10 Russian and one East European double agent and claimed he was motivated by greed alone in carrying out what officials describe as the worst security breach in the 47-year history of the CIA.

"These are crimes which caused people to die as surely as if the defendant pulled the trigger," said Assistant U.S. Attorney Mark J. Hulkower. And they died, he added, "because Rick Ames wasn't making enough money for the CIA and wanted to live in a half-million dollar house and drive a Jaguar.

"Well, Rick Ames bought the house, he bought the Jaguar, and he acquired the other trappings of wealth that he couldn't acquire on a government salary, but at some point Rick Ames has to pay the price," Hulkower said.

Ames and his wife, Maria del Rosario Casas Ames, 41, pleaded guilty to conspiracy to commit espionage and tax fraud. Sentencing for Rosario Ames, who pleaded guilty to a lesser version of the espionage charge than her husband, was delayed until August. She could be released in five years if her husband cooperates fully with authorities. That is a powerful incentive for both of them because they desperately want her to be reunited with their 5-year-old son, Paul, who is now in Rosario Ames's native Colombia.

The proceeding in U.S. District Court in Alexandria, however, was anything but a final chapter in the spy case. Still unfolding are investigations on Capitol Hill and within the CIA to determine exactly how Ames could have operated without detection for so many years.

Authorities are just beginning to assess how much harm Ames caused to national security. A key element of the process will start today when Ames begins a rigorous interrogation by the CIA and FBI.

The discovery of Ames has set off a chain reaction of counterintelligence investigations, not only in the CIA but also the FBI, State Department and Defense Department.

His case, in addition, has led to a proposal to restructure how internal spy-catching is handled throughout the government, removing much of the authority from the CIA and giving it to the FBI, with the National Security Council providing ultimate guidance. The FBI and CIA had been arguing over this responsibility for years.

"All of us at CIA are extremely gratified by the sentencing today," CIA spokesman Kent Harrington said yesterday. "Our objective is to make sure that we learn from this case and then use that knowledge to improve" U.S. counterintelligence work.

CIA Director R. James Woolsey told reporters that the settlement would free the agency from a series of constraints imposed by the Justice Department on its internal investigation into what went wrong. The CIA can "begin to talk to our own people about what transpired," Woolsey said.

At yesterday's hearing, the government disclosed for the first time a list of 11 Soviet military and intelligence officers who had been compromised by Ames. All of them had been cooperating with the CIA and friendly foreign intelligence services. As part of his plea bargain, Ames signed a statement in which he admitted identifying the agents. Prosecutors said at least four were executed, but Ames said that he did not know the fate of those he had betrayed.

Only the code names of the agents were provided in court, but sources provided the real names of two. One was Oleg Gordievsky, code-named "GTTICKLE," who had been the chief KGB officer in England. In 1985, Gordievsky was ordered back to Moscow and arrested, but in an amazing coup, the British kidnapped him from the KGB and returned him to England. For years, the CIA has denied to British intelligence that the Americans had anything to do with Gordievsky's betrayal.

Another longstanding mystery was solved with the identification of General Dimitri Polyakov, code-named "GTACCORD," a top-ranking Soviet Army intelligence officer initially recruited by the FBI. For almost 20 years, Polyakov provided information to the CIA and to the FBI, where he was also known under the code name "TOPHAT." His arrest and eventual execution was for a long time blamed on a leak from the late James Angleton, the CIA's legendary mole-hunter. Angleton, according to persistent stories, thought that Polyakov was providing false information.

Other agents identified by code name as being executed after being revealed by Ames include: "GTCOWL," a Soviet intelligence officer stationed in Moscow who disclosed that the KGB used an invisible substance known as "spy dust" to track U.S. officials; "GTMOTORBOAT," an Eastern European security officer who had cooperated with the CIA; and "GTMILLION," a lieutenant colonel in the Soviet military intelligence.

After yesterday's hearing, Ames's lawyer, Plato Cacheris, told reporters that Ames did not know the names of any other U.S. government employees inside or outside the CIA who were working for the KGB.

The Ames investigation -- codenamed "Nightmover" by the FBI -- has the ingredients of a Tom Clancy novel. There are code names, crypted messages and Swiss bank accounts. Ames operated under the name "KOLOKOL," which means bell in Russian, and often reported to a handler code-named "Sam," who worked for the Russian Embassy.

He and his handlers left chalk-marked signals on mailboxes and other spots in the Washington area, and met secretly in locales such as Rome; Bogota, Colombia; and Caracas, Venezuela. For his work, Ames now has admitted receiving more than $2.5 million from Moscow and acknowledged that in October 1993 the Russians promised another $1.9 million and set up at least two more years of meetings.

FBI officials said Ames got at least twice as much money as any other spy or spy network ever employed by the Soviet Union. He and his wife used the funds to buy a $540,000 house in Arlington, expensive cars, extensive wardrobes, jewelry and other luxuries. Ames received $336,000 in take-home pay from his CIA job from 1985 through 1993, prosecutors said.

In court yesterday, the couple agreed to turn over their homes, cars and bank accounts to the government. They also signed agreements that would require them to turn over any money they might make from books, movie deals or interviews and to let the CIA screen what they say.

Ames pleaded guilty to a 46-page indictment that revealed many new details about his activities. His wife pleaded guilty to joining in the conspiracy by aiding her husband starting in 1992, when she learned of his espionage after finding a note about a meeting with the Russians in his wallet.

The couple sipped water and talked quietly to one another in the moments before their appearance before U.S. District Judge Claude M. Hilton. Both were dressed in jail uniforms. Ames appeared composed and self-assured; his wife looked tired and drained. She wore a crucifix around her neck that she clutched frequently.

Rosario Ames was the first to plead guilty, speaking in a quiet, nearly inaudible voice. She could face up to 10 years in prison, but prosecutors agreed to seek a term of no more than 63 to 72 months provided her husband fully cooperates with them.

With his wife sitting behind him and occasionally breaking into tears, Ames then made his guilty plea and read his statement.

"I bitterly regret the catastrophe which my betrayal of trust has brought upon my wife and son and upon any who have loved or cared for me," he said.

He defended his wife, who he married in 1985, and said he had forced her to let him continue working for the Russians. He said he manipulated her by implying that her extravagance was behind his espionage and that, "She shrank from turning me in, hoping against hope that we could survive detection until my retirement."

Ames attacked prosecutors for revealing the day after their Feb. 21 arrests that his wife once had been a paid CIA informer in Mexico City. He said prosecutors implied that Rosario had betrayed her own Colombian government in working for the CIA; all she did, he said, was let the CIA use her apartment for meetings.

He saved his most bitter attack for the CIA and the espionage business, which he called "a self-serving sham, carried out by careerist bureaucrats who have managed to deceive several generations of American policymakers and the public about both the necessity and the value of their work."