People rescued by the ship Aquarius in the Mediterranean.
Photograph: Nicoló Lanfranchi for The Guardian

The Aquarius migrant rescue ship has been allowed to dock in Malta after five EU countries agreed to take in its passengers, ending a standoff over who should accept the vessel.

The Aquarius had been drifting in the central Mediterranean since rescuing 141 people on Friday, after Italy refused to allow it to dock in its ports.

The passengers’ fate had been uncertain until Malta’s government announced on Tuesday that several EU member states had “agreed on a responsibility-sharing exercise” for the people on board, who are mostly from Eritrea and Somalia and include 67 unaccompanied children.

“Malta will be making a concession allowing the vessel to enter its ports, despite having no legal obligation to do so,” the Maltese government said in a statement. “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.”

The UK was not named in the statement, despite calls by the Italian government for Britain to take in the passengers because the Aquarius was sailing under the flag of the British territory of Gibraltar.

The Foreign Office had said it was “deeply concerned” about the passengers, without responding directly to the demand by Italy’s transport minister, Danilo Toninelli, that the UK should “assume its responsibility”.

Malta, which is the smallest member state of the EU, with a population smaller than the city of Leicester, said it had rescued an additional 114 people at sea on Monday. Of these, 54 will be taken in by Malta and 60 will be distributed among other EU states.

Few of the 67 unaccompanied minors rescued on Friday Photograph: Nicoló Lanfranchi for The Guardian

Aid workers on the Aquarius said on Tuesday they had heard “disturbing accounts of kidnapping and extortion” of child refugees in Libya. “I begged my captors to just kill me,” one teenager was reported to have told the charity Médecins Sans Frontières, which co-runs the ship with SOS Méditerranée.

The EU commissioner for migration, Dimitris Avramopoulos, welcomed the decision of the Maltese government and praised France, Spain, Germany, Portugal and Luxembourg “for their solidarity”. But he added: “We cannot rely on ad-hoc arrangements, we need sustainable solutions. It is not the responsibility of one or a few member states only but of the European Union as a whole.”

The standoff over the Aquarius highlighted ongoing tensions in the EU over how to manage people fleeing conflict or persecution or seeking a new life in Europe. In June EU leaders promised to create “controlled centres” on EU soil to assess the asylum claims of people who had crossed the Mediterranean. No country has yet agreed to set up such processing centres.