Italy agreed Sunday night to accept 140 migrants stranded aboard a Turkish cargo ship that rescued them in the Mediterranean, ending a four-day standoff with Malta about who would take them in.

The Italian government "has decided to let humanitarian reasons prevail," Foreign Minister Franco Frattini said.

"Malta should have taken them in," Frattini told state TV.

A Foreign Ministry statement said the decision was made "exclusively in consideration of the painful humanitarian emergency aboard the cargo ship" and that its acceptance of the migrants "must not in any way be understood as a precedent nor as a recognition of Malta's reasons" for refusing them.

Doctors taken aboard the 230-foot long Pinar by the Italian coast guard had found cases of chicken pox and high fever among the migrants, the Italian news agency ANSA reported, although coast guard officials had said that earlier medical checks had turned up nothing worrisome about the passengers' condition.

There was no immediate reaction from Malta.

Frattini and Interior Minister Roberto Maroni, who is from the anti-immigrant Northern League Party, made the decision after consultations with Premier Silvio Berlusconi, who had spoken by telephone with both the European Commission president and with the Maltese prime minister.

The Pinar, which was anchored about 25 miles southwest of the tiny Sicilian island of Lampedusa, was expected to dock Monday at Porto Empedocle in Sicily.

Some 20 ailing migrants, as well as a pregnant woman, were being taken by coast guard cutter to to Lampedusa, ANSA reported. Authorities have not said what they migrants' nationalities are.

The Foreign Ministry statement decried what it called the Maltese government's "persistent unwillingess" to take the migrants "despite appeals by from European Commission President" Jose Manuel Barroso.

Earlier Sunday, the coast guard delivered 1,000 liters (about 1,000 quarts) of drinking water to the migrants aboard the Pinar, which had rescued them Thursday after the two small boats they were traveling in began foundering.

Two migrants had been evacuated by helicopter to Lampedusa on Friday because of poor health.

The 13-member Turkish crew also recovered the body of a young woman in one of the boats, Cmdr. Cosimo Nicastro, of the Italian coast guard said. The decomposing body was later taken by a motorboat to Lampedusa, ANSA said.

Malta insisted that the Pinar take the migrants to Lampedusa because it is the nearest port. Italy contended Malta should have taken them because the ship was in Malta's search and rescue area.

Lampedusa has a holding center for illegal migrants.

Each year, tens of thousands of migrants pay smugglers to try to reach Italian shores. Often their boats capsize, and nearby fishing boats or military ships rescue them.

Maltese army authorities said Malta contends that under international maritime conventions, the nearest port of call is obliged to accept rescued seafarers.

The Pinar, loaded with grain, had been sailing to Tunisia when it rescued the migrants, Nicastro said.