A mother and a child disembark from a patrol boat in Malta.
Malta has been pushing other European countries to take in around 250 migrants now in its care before it would allow the two rescue boats to disembark.
A group of 49 migrants that were left stranded on board two NGO-operated rescue vessels disembarked in Malta on Wednesday afternoon.
The deal calls for 300 migrants to be redistributed between eight countries, including Ireland.More news: R. Kelly May Face Investigation Following Lifetime Series
The deal also decides the future of another 249 rescued migrants already in the island nation.
Joseph Muscat, prime minister of Malta, announced the details that end the deadlock that began when 32 people were rescued by the Dutch-flagged humanitarian rescue ship "Sea-Watch 3" on 22 December.
Pope Francis, at the weekend, appealed to European leaders to show "concrete solidarity" and give the migrants "a safe port".
The 49 migrants were on two ships refused permission to dock by both Italy and Malta. "It is in our nature to assist those in distress but as prime minister I can not shirk responsibility of safeguarding our national security and national interest".
But Italy's coalition government remains starkly divided over the issue.More news: French ministers aghast at support for boxer who fought police
Mr Avramopoulos said the fact that some of the migrants had to wait at sea for three weeks "is not what the European Union stands for".
Italy's populist government split over the fate of those aboard Sea-Watch 3 and another private vessel, Sea-Eye, with Premier Giuseppe Conte saying that Italy was willing to take children and their parents, even as Mr Salvini remained defiant.
But Italian Interior Minister Matteo Salvini has demanded a "clarification" since the agreement was announced.
"Caving to the pressures and threats of Europe and the non-governmental organisations is a sign of weakness that Italians don't deserve".More news: Clemson Rolls Tide To Win Natl Title