The Bush Administration said today that it had closed a deal with President Boris N. Yeltsin of Russia to resolve the fate of the American Embassy in Moscow that was never occupied because it was bugged by the Soviets.

Work on the embassy was stopped in 1985, after it was determined that the building was so riddled with listening devices implanted by Soviet workers that the structure was in effect a multistory microphone. Washington and Moscow, as well as the Administration and Congress, have been haggling over what to do with the building ever since.

A State Department spokesman, Richard A. Boucher, said that under the new agreement the United States would abandon its demand for $30 million from Moscow to compensate for the costs of reconstructing the bugged embassy chancery building. In return, he said, the United States will get more land to build on in Moscow, favorable lease terms and the right to construct its own secure building, without having to hire local workers. Those concessions, he said, will outweigh the cost of dropping the $30 million claim over the old building.

Under the agreement, said Mr. Boucher, "We would gain control of a vital piece of land in Moscow which would connect our present chancery with our new complex, giving us a contiguous property block."