Germany moved to resolve one of the gravest injustices left over from World War II today when it formally pledged to pay $5.2 billion in belated compensation to hundreds of thousands of Nazi-era slave workers and other victims of the Third Reich.

The final settlement, reached after months of negotiations conducted by the United States and Germany, was hailed by representatives of both countries as a laudable example of Germany taking moral responsibility for the legacy of the Holocaust.

But even as they toasted their achievement, the two leading negotiators cited potential pitfalls that could block the money from reaching the victims. While Germany's Otto Lambsdorff warned about unseemly haggling over lawyers' fees, U.S. Deputy Treasury Secretary Stuart Eizenstat said that sorting through up to 1.7 million possible recipients could delay payments for up to a year.

In addition, the terms of the agreement could pose enormous difficulties for the government of Chancellor Gerhard Schroeder, who made the deal possible this week when he boosted the state's contribution to 5 billion marks ($2.6 billion), matching the amount put up by German industry.

With the federal budget strained by an austerity campaign, German Finance Minister Hans Eichel said the government has insufficient funds to back up Schroeder's pledge. He said the only way to raise cash will be to sell off a number of state properties through the auction of land, buildings and businesses--a process that could take months.

Despite the commitment, aides say Schroeder concluded early this week after several conversations with President Clinton that it was imperative for him to step in with a deal-clinching contribution. They said Schroeder realized it would be intolerable not to resolve Germany's debts to the most indigent victims of Nazi-era labor camps before the close of the century, and also clear up a festering problem in German-American relations that could quickly worsen with a flurry of fresh lawsuits.

Most of the cash from the fund will go to an estimated 240,000 survivors of concentration camps that were designed to work them to death. These so-called slave workers are expected to receive about 15,000 marks ($7,800) each, while more than a million former laborers who were subject to less torturous routines in munitions factories and other industries would each receive about half that sum.

At a news conference today, Schroeder said he believed that Germany had an obligation to atone for its share of crimes committed during "the bloodiest century in history," and that German leaders of the postwar generation--in both government and industry--must show they are willing to make amends for human rights abuses committed by the Nazis.

Opinion polls suggest that Schroeder's decision has broad support among the German public, which seems willing to bear the extra tax burden if necessary to pay reparations to slave laborers. Lambsdorff reported that many citizens have been making unsolicited donations to the slave labor fund.

Secretary of State Madeleine K. Albright, who joined the negotiators for their climactic session here, said it was a sad truth that justice came late for victims of the Nazi labor camps. "Survivors have dwindled in number and advanced in age," she said. "They have waited far too long not simply for money, but also for the frank acknowledgment that their suffering was terrible and wrong."

Nonetheless, Albright praised the German government and the 65 German corporations that agreed to provide money for the fund. "They have done the right thing and acted with great dignity," she said.

While Germany has paid more than $60 billion to Holocaust survivors and their heirs, Albright said today's agreement was "the first serious initiative to acknowledge the debt owed to those whose labor was stolen or coerced during that time of outrage and shame."

Only last week, the negotiations appeared on the brink of collapse because some lawyers for the victims were demanding at least double what Germany was willing to offer. But on Tuesday they finally bowed to pressure from Jewish groups and governments in Eastern Europe who feared that the survivors would wind up with nothing. Most survivors live in Eastern Europe, are now close to 80 years old and are dying at a rate of 10 percent a year.

The deal puts a cap of 10 billion marks ($5.2 billion) on Germany's liability to make payments to slave workers and forced laborers, and also to settle future lawsuits. It also provides "legal peace" for German companies who feared that they would face endless litigation for their use of coerced labor during the war.

To reassure such major companies as Siemens and Volkswagen that have large American business interests, the U.S. government said it will "take all appropriate steps" to oppose state and local actions against German companies arising out of Nazi-era claims. The United States also agreed to contribute an extra $10 million as a show of solidarity to encourage educational projects on the Holocaust and provide social benefits to heirs of slave and forced laborers.

Lambsdorff and Albright made a special appeal that all parties involved in the settlement should ensure that the vast majority of funds go to the victims and not be eaten up by administrative costs and lawyers' fees.

As a sign of their willingness to show good faith, the American lawyers who filed the class-action suits said they would forgo the usual contingency fees that in some cases can run as high as 50 percent of the final settlement. But they were still expected to reap huge remuneration for their services, which U.S. and German officials said could reach $50 million.