BUDAPEST, Hungary (AP) _ Soviet and Hungarian officials agreed on compensation for environmental damage caused by the Red Army during its 46-year occupation, a newspaper reported Tuesday.

The dispute had threatened to stall the final withdrawal of Soviet troops.

The Hungarian daily Magyar Nemzet said a preliminary agreement was signed after months of negotiation by Lt. Gen. Antal Annus, state secretary of the Hungarian Defense Ministry, and Lt. Gen. Viktor Shilov, commander of Soviet troops in Hungary.

No figure for actual payment was set, the daily said. It said two documents set procedures for turning a Soviet base over to Hungarian authorities and stipulate how to assess environmental damage caused by the Soviet military.

Hungary and the Soviet Union agreed in March 1990 that all 49,700 Soviet soldiers and airmen and their equipment would be withdrawn by the end of this June. Compensation, which was not covered by the agreement, had been a thorny issue ever since.

The Soviets demanded the equivalent of $4 billion upon the vacating of each base. Hungary rejected the demand, saying the base facilities were in disrepair and citing extensive environmental damage, such as oil and gasoline leaked into subsoil and ground water.

The Hungarians have been unable to enter Soviet bases until each has been evacuated, so there has been no overall estimate for environmental damage.

Col. Gen. Matvei Burlakov, then commander of the Soviet forces and now in charge of Red Army forces in Germany, at one point threatened to halt the pullout if the Hungarians did not pay.

The April 5 issue of the weekly Heti Magyarorszag reported that 80,568 Soviet citizens, including about 80 percent of the Soviet troops, had left Hungary by the end of March.

All tactical rocket launchers, 94 percent of combat vehicles, more than 75 percent of the artillery pieces and two of four air squadrons had left, it said.