WASHINGTON (CNN) -- Libya will pay hundreds of millions of dollars to victims of terrorist attacks involving Americans in an agreement signed and finalized Thursday, the U.S. State Department said.



U.S. Assistant Secretary of State David Welch, left, and Libyan Deputy Foreign Minister Ahmad Fitouri sign the deal.



Assistant Secretary of State David Welch signed the deal in Tripoli, Libya, on Thursday. If implemented, the deal will end Libya's legal liability in numerous lawsuits from families of victims of what the United States considers Libyan terrorist acts. It also paves the way for stronger ties between the two nations and increased U.S. involvement in the oil-rich nation.



"This resolves the last major historical issue that has stood in the way of a more normal relationship between our two countries," Welch said.



The deal had hinged on congressional approval. Last month, just before leaving for summer recess, Congress unanimously adopted the Libyan Claims Resolution Act, sponsored by Sen. Frank R. Lautenberg, D-New Jersey. The legislation cleared the way to end the feud with Libya over terrorist attacks and creates a fund for victim payments.



"The Libyans didn't believe that Congress would ever be helpful, and Congress didn't think Libya would ever do it," Welch said Thursday. "We found a diplomatic way to accommodate both sides by turning suspicion into an asset."



Under the new law, Congress gives the Bush administration the authority to restore sovereign immunity for Libya only when the United States receives the agreed-upon money to pay American claimants in the fund and the secretary of state certifies it.  See a timeline of events following the Pan Am attack »



Once the money is received into the fund, Libya would be exempted from legislation passed this year enabling terrorism victims to be compensated from frozen assets of governments blamed for attacks.



The 1988 bombing of Pan Am Flight 103 over Lockerbie, Scotland, killed 270 people, including 189 Americans. The 1986 La Belle disco bombing in Berlin, Germany, killed two American servicemen and injured 79 Americans.



Libya has paid 268 families involved in the Pan Am bombing $8 million each of a $10 million settlement. It was withholding the remaining $2 million owed to each family over a dispute regarding U.S. obligations to Tripoli.



Under the deal, Libya would pay more than $500 million to settle remaining claims from the Lockerbie case and more than $280 million for victims of the La Belle disco, according to Jim Kreindler, the lead attorney for the Pan Am families.



It would also set aside funds to compensate victims of several other incidents blamed on Libya but for which Libya hasn't accepted responsibility. The total settlement could exceed $1 billion.



The pact, supported by the victims' families, closes the book on a contentious period in U.S.-Libyan relations. Ties between the two countries began to improve in 2003, when Libya gave up its weapons of mass destruction program and began compensating Lockerbie victims.



But lingering lawsuits prevented the two countries from fully normalizing ties. A joint U.S.-Libya statement issued Thursday in Tripoli said "both parties welcomed the establishment of a process to provide fair compensation for their respective nationals, and thereby turn their focus to the future of their bilateral relationship."



This spring, Libya made a proposal to the Bush administration that held some promise in settling the dispute, Welch said. Over the next several months, he and State Department lawyers held closed-door negotiating sessions with the Libyan delegation in London, England; Paris, France; Berlin; and Abu Dhabi, United Arab Emirates, where he finally secured a tentative agreement in late July.



The afternoon he came back from Abu Dhabi, Welch met with Lautenberg and urged passage of the legislation.



Welch said Libya would expect an end to the claims and put the longstanding dispute with Libya to rest, despite the lingering mistrust of Libyan leader Moammar Gadhafi.



"This could not have worked without a great deal of honesty on everyone's part," Welch said.



On Thursday, Lautenberg issued a statement expressing satisfaction with the agreement.



"For too many years, Libya has
Who will be exempt from law allowing terror victims to be paid with frozen assets? What does the deal end? What did the deal end? How much does Libya have to pay to settle? How much will libya pay?
Libya Libya's legal liability in numerous lawsuits Libya's legal liability in numerous lawsuits hundreds of millions of dollars hundreds of millions of dollars
question: Who will be exempt from law allowing terror victims to be paid with frozen assets?, answer: Libya | question: What does the deal end?, answer: Libya's legal liability in numerous lawsuits | question: What did the deal end?, answer: Libya's legal liability in numerous lawsuits | question: How much does Libya have to pay to settle?, answer: hundreds of millions of dollars | question: How much will libya pay?, answer: hundreds of millions of dollars