That mole-hunt team played a critical role in the counterespionage probe that led to Mr. Hanssen's arrest, United States officials said. It was a successor to an earlier C.I.A. mole-hunt team that helped uncover Mr. Ames. The tunnel was built under Moscow's embassy complex on Washington's Wisconsin Avenue, a hilltop location known as Mount Alto, officials said.

The Soviets were prevented for years from fully occupying the embassy complex as a result of a long-running dispute with the United States about charges that the American Embassy in Moscow had been thoroughly bugged. Soviet diplomats occupied apartments there in 1979, and Congressional critics charged that they were using those buildings as espionage outposts. In the mid-1980's, some American lawmakers claimed that the hilltop location would give the Soviets an edge in intelligence gathering against United States government buildings in Washington. The new embassy complex was not fully occupied until after the collapse of the Soviet Union.

Meanwhile, the American intelligence offensive against the embassy remained hidden from public view even as the United States publicly protested a Soviet campaign to lace the new United States Embassy in Moscow with listening devices. Construction on the new American Embassy in Moscow was halted in 1985 after the Reagan administration protested that Soviet construction crews were imbedding eavesdropping equipment within the walls of the new chancery building. The disclosure that the United States believed that the new embassy was bugged sparked Congressional hearings and criticism of the handling of the matter by the State Department and the Central Intelligence Agency.

Ultimately, after considering tearing the embassy down, the United States flew in American construction workers and lopped off the top two floors and replaced them with two new secure floors before finally occupying the new facility.

The United States operation against the new Soviet Embassy in Washington, like the Soviet bugging of the United States Embassy complex, was designed to eavesdrop on electronic communications and conversations inside the facility. F.B.I. agents were secretly placed in critical jobs in some of the key contractors hired by the Soviets, according to an individual knowledegable about the planning of the operation. That individual said that bugging the building involved the use of secret technology developed by the intelligence community to pick up sounds inside a large building.

The tunnel operation against the Soviet complex, designed to tap into electronic communications inside the embassy facility, is just one of many similar clandestine technical operations run by the United States intelligence community, both during and since the cold war. And, like the embassy operation, many of those other operations were eventually compromised by spies.

In the 1950's, the C.I.A. dug a tunnel into East Berlin in order to tap into Soviet telephone lines. But George Blake, a British intelligence officer who was then a spy for Moscow, is believed to have betrayed the operation to the Soviets.