The new Spanish government has stepped in to end a standoff on the high seas, agreeing to take in more than 600 migrants picked up by a rescue ship in the Mediterranean at the weekend.
Both Italy and Malta had refused to let the ship, the Aquarius, dock.
It had been sailing towards Italy but the country’s hard-line new Interior Minister Matteo Salvini banned it - and said it should go to Malta instead.
In the end Spain came to the rescue, saying the ship could dock in the eastern port of Valencia.
Salvini was quick to declare victory.
''The first goal has been achieved,’’ he wrote on Twitter.
But Malta’s Prime Minister Joseph Muscat accused Italy of violating international law and warned that a solution to the migrant crisis must be found before it happens again.
Both Italy and Malta want all European Union countries to share the burden of the mass arrivals.
Valencia is almost three days' voyage for the Aquarius, while Italy and Malta are just hours away.