Libya's Supreme Court has upheld the death sentences of five Bulgarian nurses and a Palestinian doctor convicted of infecting more than 400 children with the AIDS virus.

But the verdict issued by Judge Fathi Dahan on Wednesday is not the final word, as Libya's Supreme Judicial Council, which is headed by the minister of justice, could approve or reject the convictions or hand out lighter sentences.

"The court has accepted the appeal in principle but rejects its content, therefore the court decided to uphold the verdict against them,'' the judge told the courtroom.

The five nurses and the Palestinian doctor were not in court for the appeal hearing.

While announcing the verdict, the judge did not mention a settlement announced a day earlier by a foundation headed by the Libyan leader's son.

The Gadhafi foundation had said that the families of the HIV-infected children reached an agreement with the convicted nurses and doctor, but no other details were provided.

The six foreign medical workers, who deny infecting the children, have been detained for nearly seven years.

They began working at the hospital in the city of Benghazi in 1998 and were arrested the next year after more than 400 children there contracted HIV. Fifty of the children have died.

The prosecution insists that the six infected the children intentionally in experiments to find a cure for AIDS .

Defence experts testified the children were infected by unhygienic hospital conditions. In their testimony, the workers said the confessions used by the prosecution had been extracted under torture, and some of the nurses said they were also raped to force confessions.

The six were convicted of and sentenced to death in 2004, but the Supreme Court ordered a retrial after an international outcry over the verdicts.

U.S. President George Bush last month called on Libya to free the medics. The case has also hampered Libya's attempts to rebuild ties with the U.S. and Europe.

In a shocking ruling in December, the second trial ended with the same verdict, despite a scientific report weeks earlier saying HIV was rampant in the hospital before the six began working there.

Two Libyans -- a police officer and a doctor -- were put on trial on charges of torturing them, and were later acquitted.

The move led to the six medical workers being put on a new trial for defamation. They were acquitted of defamation in May.

With files from The Associated Press