WEST BERLIN, SEPT. 10 -- Reunified Germany will pay $8 billion to support, move, house and retrain the 360,000 Soviet soldiers still stationed in East Germany, according to Bonn officials responding tonight to a statement by Soviet Foreign Minister Eduard Shevardnadze.

In an interview with Western news agencies in Moscow, Shevardnadze said that a compromise had been reached on support for Soviet troops, but he declined to cite a figure. Despite public denials, officials in Bonn privately confirmed the accord.

The agreement appears to end a week of escalating Soviet demands for higher West German payments in exchange for removal of Soviet forces.

West German Foreign Minister Hans-Dietrich Genscher bluntly called the payment to Moscow the "price of German unity."

Chancellor Helmut Kohl promised Soviet President Mikhail Gorbachev at their meeting in July that West Germany would ease the financial strain of supporting Soviet troops in a country that made a cold-turkey switch to hard currency and Western prices.

But the two leaders did not reach agreement on a price, and their negotiators moved further apart in weeks of talks. Last week, the Soviets upped the ante, demanding $11.5 billion and threatening to withhold agreement on the return of full sovereignty when the two Germanys complete their unification on Oct. 3. Bonn, meanwhile, was offering $4.5 billion.

Today, less than 48 hours before the foreign ministers of the two Germanys and the four victorious World War II powers meet in Moscow to sign an accord ending foreign legal rights stemming from their postwar occupation of Germany, the Germans met the Soviets halfway, according to Shevardnadze's statement.

"There will be no argument over sums," Shevardnadze said. "The main agreement on this has been reached. I will not cite the figure. A compromise was found, a reasonable compromise. It suits us and our partners. . . . The main thing is that we reached agreement. This is not charitable work, but the minimum needed to set up normal conditions for housing those returning."

The Bonn government announced that Kohl and Gorbachev spoke by telephone today, but failed to reach an agreement on support for Soviet troops. West German negotiators are to meet with their Soviet counterparts in Moscow on Tuesday to hammer out the final details of the bilateral agreement.

The Soviet Union has agreed to remove all of its troops from East German territory by the end of 1994. But the Soviets have acknowledged that they have neither the funds to transport the soldiers and their families -- a total of nearly 600,000 people -- nor sufficient housing or jobs for them back home. The Germans are eager to resolve outstanding issues surrounding foreign control in their territory before the Oct. 3 unification celebration.

Kohl has spoken for months about the prospect of regaining his nation's full sovereignty at the same time as East and West Germany merge. But Genscher said last weekend for the first time that sovereignty may lag behind unification by several months. German and Soviet diplomats have said in recent days that the Soviet withdrawal from East Germany may be quicker than planned. East Germans recently have expressed irritation with the Soviet military presence, staging demonstrations and several attacks on Soviet soldiers.

A robbery attempt last weekend by Soviet soldiers near Wittstock, 60 miles northwest of East Berlin, is likely to exacerbate Soviet-German relations. According to an East German police spokesman, the soldiers tried to rob an electronics store and escaped from police after a highway chase. Police said Soviet troops are suspected in dozens of recent burglaries.

Concerned over growing resentment toward Soviets in East Germany, West German Defense Minister Gerhard Stoltenberg today asked Moscow to move immediately to limit military exercises there. Stoltenberg also announced that the East German army, once considered the most formidable East European force in the Warsaw Pact, will have shrunk to about 90,000 soldiers -- about half its size at the beginning of this year -- by the time it is dissolved Oct. 3.

Meanwhile, East Germany and the Soviet Union today took a step toward resolving their economic problems. Moscow agreed to buy $636 million worth of cigarettes and food from East German farmers who have been unable to find a niche in the combined German market.

The deal includes 1 billion cigarettes -- an attempt to resolve a severe shortage in the Soviet Union that has sparked protests. East German farmers also will be able to unload about 255,000 tons of meat, 60,000 tons of butter, 5,000 tons of fish and more than 1 million eggs.