France has agreed to take 60 of the migrants, as its share of an agreement that will see Spain also take 60, Germany up to 50, Portugal 40, and Luxembourg 15.
Most of the migrants on board the Aquarius are from Somalia or Sudan.
They include two children younger than five and three younger than 13, according to Aloys Vimard, a Doctors Without Borders coordinator on board.
Malta initially refused to let the Aquarius dock when it picked up two boatloads of migrants last week, as did Italy, whose far-right Interior Minister Matteo Salvini has vowed that it will "never see an Italian port" again.
Italy's new coalition government has declared a get-tough policy on migration, pointing to the 700,000 people who have arrived there since 2013 and the refusal of other countries, notable France, to allow them to enter their territory.
Calls for EU solution
The NGO that runs the Aquarius, SOS Méditerranée, welcomed the agreement in a Tweet on Wednesday but called for "lasting solutions to ensure the future of humanitarian intervention in the central Mediterranean".
SOS Méditerranée welcomes the European accord
????Nous saluons l'annonce d'une réponse européenne coordonnée concernant le débarquement des 141 rescapés de l'#Aquarius. Des solutions durables doivent néanmoins être trouvées pour assurer l'avenir de l'intervention humanitaire en #Méditerranée centrale????????https://t.co/erUiewN4HMSOS MEDITERRANEE France (@SOSMedFrance) 15 août 2018
UN High Commissioner for Refugees Filippo Grandi also hailed the "end of the impasse" but added that "this situation should never have reached this point".
UNHCR's Filipo Grandi tweets on Aquarius
European states must agree on a shared, predictable disembarkation mechanism for refugees and migrants rescued at sea. Meanwhile, it is wrong, dangerous and immoral to keep rescue ships wandering in the Mediterranean while governments compete on who takes least responsibility. pic.twitter.com/XKYk64p4xRFilippo Grandi (@RefugeesChief) August 14, 2018
French President Emmanuel Macron's office said it would propose a "lasting mechanism" to "avoid repeated crises" over the next few weeks and France's refugees' office, Ofpra, said it would send a delegation on Thursday to identify the refugees who would come to France, while refusing to take migrants who fail to reach the criteria needed to be classed as refugees.
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/OXaO2SRZgmEmmanuel Macron (@EmmanuelMacron) 14 août 2018
France also once again condemned Italy's refusal to allow rescue ships to dock with the spokesman of Macron's Republic on the Move party slamming "demagogy with Salvini sauce".
French government criticised
Right-wing MP Eric Ciotti, who represents a seat on the Mediterranean coast, criticised the five countries' agreement as "playing into people-smugglers' hands", claiming that Macron represents "immigration and the European Union's permissiveness".
Two high-profile former political representatives joined calls for a Europe-wide response to the refugee situation.
Former Euro-MP Daniel Cohn-Bendit called for a European refugee agency "with a significant budget" to be set up.
Macron "is trying to show that we need cooperation between countries," he told Le Monde newspaper, "but he is isolated on the European stage, in particular because of Germany".
Former French foreign affairs minister Bernard Kouchner, who was also a cofounder of Doctors Without Borders, called for a "specific mechanism to share" refugees and for France to be "more generous".
"Bravo the Aquarius!" for bringing the matter to a head, he declared and regretted that the government had not taken up the Corsican local government's offer to allow the ship to dock.
The Macron government "behaves like a security company", he commented.
"When you see people who help migrants barefoot in the snow coming over the passes from Italy on trial, what a disgrace!" he declared, in reference to recent convictions of activists in the south of France.