Libya says a settlement could be reached in the case of five Bulgarian nurses found guilty of infecting more than 400 children with HIV.
The nurses and the Palestinian doctor say they are innocent
Foreign Minister Abdelrahman Shalgam said the death penalty against the nurses could be dropped, if all parties involved reached a consensus.
The announcement came as Bulgarian President Georgi Parvanov met Libyan leader Muammar Gaddafi in Tripoli.
Libya's Supreme Court is due to rule on an appeal by the nurses on Tuesday.
The five nurses and a Palestinian doctor have been in custody since 1999, after being accused of deliberately giving HIV-tainted blood to the children.
The six claim they were initially tortured into confessing.
Relatives of the children held a protest at Tripoli airport on Mr Parvanov's arrival, calling for the death of the Bulgarian nurses.
The Bulgarian president held a one-hour meeting with Colonel Gaddafi which, among other issues, is understood to have touched on the controversial case.
"Everything can be resolved so long as there is no provocation, especially as the talks with the Bulgarian foreign minister are going in the right direction," Mr Shalgam said.
"The solution is in the hands of the justice system. Like everywhere in the world, justice will have the final word," he told reporters outside Colonel Gaddafi's tent.
But, he added, "a settlement between the families and the Bulgarians" would be welcome.
Bulgaria has so far opposed paying compensation on the grounds that it would be tantamount to admitting the nurses, who say they are innocent, were in fact guilty.
Earlier this week, EU External Relation Commissioner Benita Ferrero-Waldner travelled to Tripoli to discuss the case with the Libyan leader.
The EU has pledged to provide the Benghazi hospital where the mass infection took place with European expertise to treat HIV.
Mr Shalgam welcomed the move but said ignoring the plight of hundreds of children while showing great concern over the fate of the nurses would be "not just inhuman but... a double standard".