The imprisonment of the medics has caused an international outcry.
They insist they are innocent of deliberately giving tainted blood to the children at the Benghazi hospital in 1998.
Compensation
A spokesman for the Libyan parents, Idriss Lagha - himself the father of one of the victims - confirmed a final deal had been reached with all the interested parties involved, including the European Union and the Libyan government.
But the content of the deal, reportedly brokered by the Gaddafi Foundation - remain vague.
Mr Lagha said details of the agreement will be made public in the coming hours or days.
The BBC's Rana Jawad, in Tripoli, says any financial settlement with the families of the infected children means they will drop their rights to pursue the death penalty.
Tripoli says that when it meets on Monday, the High Judiciary Council will take into account any financial compensation to the infected children's families and the amount of time already served by the prisoners. Its decision will be final and irreversible.
Whatever the outcome, the latest developments signal a near end to this eight-year saga, our correspondent adds.
Diplomatic efforts
Speaking after the Supreme Court ruling, Bulgarian President Georgi Parvanov urged Libya to find a quick solution.
"Unfortunately, the court's ruling today is not a surprise. We expected the death sentences to be confirmed. We expect and insist for a swift solution by Libya's High Judicial Council to finally complete the case," he said.
The families of the infected children had previously demanded the maximum punishment.
The European Commission said it regretted the decision by Libya's Supreme Court, and the EU's External Relations Commissioner, Benita Ferrero-Waldner, said she hoped the Libyan authorities would show clemency to the medics.
In recent months, the European Union has stepped up diplomatic efforts to have the medics freed. The United States has also been involved, with President George W Bush appealing for their release in June.
International attention
The six medics were found guilty and sentenced to death twice, first in 2004 and again in 2006 following a court appeal.
During their trial, one of the doctors who helped first isolate the HIV virus, Luc Montagnier, said the hospital epidemic began before the foreign medics started working at the hospital.
The government in Tripoli is caught between its wish to repair ties with the West and to defend its own legal system, the BBC's Eastern Europe reporter Nick Thorpe says.
Fifty-six of the 438 children infected with tainted blood at the Benghazi hospital have since died. |