NEW YORK (AP) — Two Lehman Brothers (NASDAQOTH: LEHMQ.PK) units have agreed in principle to settle claims totaling $38 billion.

New York investment bank Lehman Brothers collapsed in September 2008 at the height of the financial crisis.

Lehman's was the biggest corporate bankruptcy in U.S. history. Its failure caused a panic among financial companies who feared that Lehman-related losses would topple other firms.

The government soon stepped in with billions of bailout money and subsidies to prevent other big Wall Street banks from failing.

On Friday, Lehman Brothers and Lehman Brothers International (Europe) said that their agreement would allow them to proceed with plans to allocate and distribute assets to customers and creditors.

The agreement is still subject to documentation, approval by the U.S. Bankruptcy Judge James M. Peck and an order of the English High Court.

"This is a critical milestone for customers because, if approved by the court, the agreement sets the stage for distributions that will provide for 100 percent recovery of customer property," Lehman Brothers trustee James Giddens said in a statement.