The deal, which was struck last month, was signed on Friday between Libyan leader Muammar al-Qadhafi's charity foundation and German lawyers, led by Hans Joachim Ehrig representing the victims.
"This deal strengthens the relations between Germany and Libya," said Salah Abd al-Salam, who signed the agreement as the charity foundation's Managing Director.
"It also reinforces ties between the African Union, where Libya plays a leading role, and the European Union where Germany is an influential member."
A German court ruled in 2001 that the Libyan secret service was behind the bombing of the La Belle disco in West Berlin, a popular spot with US soldiers.
"This deal strengthens relations between Germany and Libya"
Salah Abd al-Salam,
managing director of al-Qadhafi's charity foundation
Two US soldiers and a Turkish woman were killed and more than 200 people injured.
The compensation covers non-US victims only. Payouts to American victims and their families are the subject of a separate legal action in the US.
Under the accord, the victims will receive the money in three instalments, $15 million next Wednesday, another $15 million on 1 December and the remaining $5 million on 1 March 2005, officials said.
Eleven people who were severely injured will receive $350,000 each and the other victims $190,000 each, officials said. Relatives of the Turkish woman would receive $1 million.
The signing of the accord came three days after al-Qadhafi became the first Arab leader to pledge compensation for Jews who have been forced to leave their homes because of religious tensions in the successive wars between Arabs and Israel since 1948.
End of isolation
The compensation deal is another significant step for Libya as it tries to end 30 years of international isolation during which al-Qadhafi was portrayed as a pariah and accused of sponsoring terrorism, mainly by the US and UK.
Libya's emergence from the cold began last December when it dramatically announced it would give up weapons of mass destruction.
Since then, al-Qadhafi has paid a ground-breaking visit to Brussels for talks with EU officials and US-Libyan relations have bloomed even though the North African country is still on the US list of state sponsors of terrorism.
Libya last year agreed to pay $2.7 billion to families of victims of the 1988 Lockerbie airliner bombing and also pledged $170 million compensation for the 1989 downing of a French commercial plane over Niger.