Malta has reached a deal with other European Union member states to allow 49 migrants on two rescues ships off the coast of the island nation to disembark, Maltese Prime Minister Joseph Muscat said.

"An ad hoc agreement has been reached," Muscat told reporters on Wednesday, adding that the deal included a decision on the fate of 249 migrants already in Malta.

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

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, while 44 Bangladeshi migrants will be repatriated.

The migrants have been stranded off the coast of Malta on two boats since late last year, with some suffering from dehydration and seasickness.

The deal follows nineteen days of impasse between EU countries over who should welcome the migrants.

190107093725641

Of the 49 stuck at sea, 32 were rescued by the German vessel Sea Watch 3 on December 22, while the other 17 were picked up by Dutch boat Sea Eye on December 29.

The migrants will first be transferred to Maltese army patrol boats before arriving on the EU island nation.

In a tweet, Sea Watch International said: "The EU decided to release their 49 hostages. After 19 days at sea, our guests will finally reach a safe port. This represents a confession of state failure, policy must not be made at the expense of people in distress."

Following the deal, Matteo Salvini, deputy prime minister and also leader of the far-right party the League, said Italy should not take any migrants from Malta.

"I am and I will remain absolutely against new [migrant] arrivals in Italy," he said on Twitter.

"To give in to pressure and threats from Europe and NGOs is a sign of weakness that Italians don't deserve," he added.

Salvini is pushing for a 'zero-tolerance' policy on migrants and vowed for days that none of the 49 migrants would reach Italian soil.