Malta has reached a deal with other EU member states to allow 49 migrants aboard two rescue ships off the coast of the island nation to disembark, Joseph Muscat, the prime minister, said Wednesday.

"An ad hoc agreement has been reached," Mr Muscat told journalists, adding that it also included a decision on the fate of 249 rescued migrants already in Malta.

The 49 migrants, including a baby and several children, were rescued while attempting the dangerous Mediterranean crossing from North Africa to Europe.

Mr Muscat said that of the total of 298 migrants, 176 would be sent to Germany, France, Portugal, Ireland, Romania, Luxembourg, the Netherlands and Italy.

Another 78 will be allowed to stay in Malta, and 44 Bangladeshi migrants will be sent back to their country.

The migrants have been stranded off the coast of Malta on the Sea-Watch and another boat since late last year, with no country allowing them to dock, suffering sea sickness and dehydration, with some briefly refusing food.