"The French government will work together with the Spanish government to handle the arrival of the migrants", Spain's deputy prime minister Carmen Calvo said in a statement.
"France will accept migrants who express the wish to go there" once they have been processed in Valencia, the statement said.
Sarah Morris, from RFI's sister TV channel, France 24, was in the Valencia port shortly after dawn. She said that members of the health department are already on board, carrying out the first process of identifying those passengers.
"There’s about 270 of them, some of them in need of urgent medical attention…We know that between seven to nine people on board those ships may be pregnant, there are about a hundred under-18-year-olds. It’s going to be a very long process," she said.
The vessel is at the heart of a major migration row between European Union member states.
Chartered by a French aid group, the vessel rescued 629 migrants including many children and pregnant women off Libya's cost last weekend.
Italy's new populist government and Malta refused to let it dock in their ports, accusing each other of failing to meet their humanitarian and EU commitments.
Spain eventually stepped in and agreed to receive the refugees.
France -- who had angered Rome by branding it irresponsible over the vessel rejection -- offered Thursday to welcome Aquarius migrants who "meet the criteria for asylum".
The ship is making the 1,500-kilometre (930-mile) voyage to Spain accompanied by an Italian coast guard vessel, which has taken on board some of the migrants.
High waves and winds forced the convoy to take a detour on the way.
The plight of the Aquarius has again highlighted the failure of EU member states to work together to deal with the influx of migrant arrivals since 2015.
After Rome's decision to ban the Aquarius, French President Emmanuel Macron and Italian Prime Minister Giuseppe Conte met on Friday and agreed that the EU should set up asylum processing centres in Africa to prevent "voyages of death."
They also demanded "profound" changes to the EU's asylum rules which put the migrant burden on their port of entry to Europe -- mainly Italy and Greece.
Italy's far-right Interior Minister Matteo Salvini warned Saturday that other NGO operated rescue ships would also be banned from docking.