MADRID — About 600 migrants disembarked from three ships on Sunday in the port of Valencia, Spain, more than a week after they had been rescued at sea only to be turned away by Italy and Malta.

Arriving separately, the Aquarius, a rescue ship, and two Italian Navy vessels reached Valencia carrying a total of 630 migrants — including pregnant women and children — that the Aquarius had originally picked up from six rubber dinghies in the Mediterranean Sea off Libya.

After their exhausting journey, migrants shouted with joy as their ships entered Valencia’s port. Some disembarked singing.

The fate of the Aquarius has underlined the deep divisions in Europe over how to handle an influx of migrants mostly from the Middle East and Africa.