Two migrants were rescued on Tuesday after spending two weeks adrift in the Mediterranean trying to reach Spain's Balearic Islands, authorities said, adding they were searching for 27 others who survivors said had accompanied them.

Another two migrants were found dead off the archipelago on Tuesday as last week's mass influx of migrants to the north African territory of Ceuta puts Spain's handling of irregular immigration under the spotlight.

Two north African men were rescued at around 3:00 am (0100 GMT) about 13 nautical miles southwest of Mallorca, the Spanish government's representative in the Balearic Islands said in a statement.

Both were taken to hospital suffering from dehydration and malnutrition, the statement said.

It said the survivors told rescuers that two boats had been drifting for 15 days and that the 27 other people who were travelling on their boat had died.