Updated 3.24pm

A migrant rescue ship stranded for four days at sea is to be allowed into Malta to disembark 141 migrants, who will then be shared by several countries, the government said on Tuesday.

The decision ends a standoff which had seen Italy, Spain and Tunisia also refuse entry to the MV Aquarius. The migrants had been rescued from boats off Libya.

"Following discussions between France and Malta, a number of European Union member states, with the support of the European Commission, agreed on a responsibility sharing exercise regarding the rescued migrants on board MV Aquarius," the government said.

Concrete European cooperation enacted on the #Aquarius, based on a French-Maltese initiative. I thank Malta for its humanitarian gesture and assure it of the full solidarity of France. There is no alternative to cooperation. https://t.co/OXaO2SRZgm — Emmanuel Macron (@EmmanuelMacron) August 14, 2018

"Malta will be making a concession allowing the vessel to enter its ports, despite having no legal obligation to do so. Malta will serve as a logistical base and all of the reportedly 141 migrants on board will be distributed amongst France, Germany, Luxembourg, Portugal and Spain."

Read: AFM patrol boat rescues 114 migrants, brings them to Malta

The government also pointed out that a further 114 migrants were rescued at sea and brought to Malta on Monday. Sixty of them will be distributed among other EU member states.

This is the second time such a migrants distribution mechanism was put into place following that relating to the MV Lifeline in June.

The government said it considers this to be a concrete example of European leadership and solidarity.

Earlier on Tuesday Amnesty International had called on Italy and Malta to stop playing with refugee and migrants' lives' after the two countries closed their ports to the Aquarius.

“European governments must stop playing with human lives. Italy and Malta’s disgraceful refusal to allow refugees and migrants to disembark in their ports is pure cruelty. These individuals have braved dangerous journeys and inhumane conditions in Libya only to be stranded at sea as governments shamelessly abdicate their responsibility to protect," Maria Serrano, Amnesty International's senior campaigner on migration, said:

“What’s equally alarming is that Gibraltar, under whose flag Aquarius has been sailing, has threatened to terminate the registration of the ship in a bureaucratic manoeuvre designed to frustrate life-saving search and rescue operations at sea. The relentless efforts of NGOs to rescue lives at sea should be celebrated, not hindered or punished" she added.

“We are calling on European leaders to urgently agree on a predictable and reliable search and rescue system that ensures the prompt disembarkation of survivors at the closest safe port, upholds the law of the sea and the primacy of saving lives in the Mediterranean. Coastal States must ensure their ports are open to those who have been rescued, and other European governments must share the responsibility of processing asylum claims by taking in asylum-seekers.”

Malta rejected any suggestion the Aquarius should dock in its ports, saying the latest rescue was made closer to Libya, Tunisia and Italy than to its own shores.

Due to pressure from Italy and Malta, most charity ships are no longer patrolling off the coast of Libya, with humanitarian organisations warning that this is leading to an unknown number of people dying at sea.