TRIPOLI, Libya - The death sentences for five Bulgarian nurses and a Palestinian doctor accused of infecting hundreds of Libyan children with HIV have been commuted to life in prison, Libya's foreign minister said Tuesday.

The ruling came after the families of the children each received $1 million and agreed to drop their demand for the execution of the six, who deny having infected more than 400 children and say their confessions were extracted under torture.

Libya's Supreme Court upheld the six medics' death sentences last week, but Foreign Minister Abdel-Rahman Shalqam said Tuesday the country's Supreme Judiciary Council had commuted the sentences to life in prison.

"Issuing this decision automatically closes the legal case against them," Shalqam told The Associated Press.

Bulgaria's chief prosecutor, Kamen Mihov, said requests would be made Wednesday to have the medics leave Libya shortly. They have been jailed since 1999.

Shalqam said Tripoli was willing to consider the medics' deportation to Bulgaria, but would not give a timeframe. He said the negotiations would take place within "the legal framework and political context" between the two countries.

"In return (for a transfer), improving the conditions of the infected children and their families should be taken into account," he told AP.

Libya is under intense international pressure to free the medical workers. Experts and outside scientific reports have said the children were contaminated as a result of unhygienic conditions at a hospital in the northeastern coastal city of Benghazi. Fifty of the infected children died.

"Thank God the death sentences were dropped. This is at least some relief that they are not going to be executed," said Zdravko Georgiev, the husband of Kristiana Valcheva, one of the jailed nurses.

"But I cannot make any forecast how long the upcoming procedures will last," the husband said in radio interview from Tripoli.

One of the medics' lawyers, Harry Haralampiev, said he was not satisfied with the decision. "I expected the council to pardon the medics," he said.

In Washington, State Department spokesman Sean McCormack said the U.S. was "encouraged" by the decision. "We urge the Libyan government to now find a way to allow the medics to return home," he added.

Idriss Lagha, head of the Libyan-based Association for the Families of HIV-Infected Children, said the families had dropped their demand because each received the compensation money they were due under a settlement reached last week.

"All the families have received their cash transfer, $1 million for each infection," Lagha told AP late Tuesday.

He said the families' association had notified a powerful Libyan group working to resolve the deadlock that all the compensation funds had been handed over.

"The fact that Libya's Supreme Judiciary Council session was called in such a short term after the latest court ruling shows the efforts of the Bulgarian government, the European Commission and the EU countries," Bulgarian Prime Minister Sergei Stanishev said in Sofia earlier Tuesday.

Bulgaria, he said, was ready "to react politically, as well as with concrete steps depending on Libya's decision."

Officials here have said the families' acceptance of a compensation settlement was key to resolving the deadlock and would allow the death sentences to be withdrawn. The son of Libyan leader Moammar Gadhafi, Seif al Islam, had told a French newspaper that $400 million in compensation would be paid to the families and would be financed in the form of debt remission.

The younger Gadhafi, who heads the group working to resolve the standoff, told Le Figaro newspaper that the countries involved were Bulgaria, Slovakia, Croatia and the Czech Republic.

But government officials from Bulgaria and other nations reportedly involved in the deal have all denied they were sending cash to the families.

Bulgaria has said it would not pay compensation because it would imply the medics were guilty, but the country's foreign minister acknowledged Tuesday his country was considering participating in an international fund for humanitarian aid to Libya.

"Since other European countries are involved in the international fund for humanitarian aid, it would be strange if Bulgaria was not interested," Ivailo Kalfin told Bulgarian National radio. "We will consider some form of participation."