Migrants, part of a group intercepted aboard two dinghies off the coast in the Mediterranean Sea, are led by a police officers after arriving on a rescue boat at the port of Malaga, Spain June 9, 2018. REUTERS/Jon Nazca

MADRID (Reuters) - Spain’s new socialist government promised on Friday it would restore free healthcare for undocumented migrants, a right removed by the former administration as part of cost-cutting.

The move is the latest migrant-friendly initiative by the government of Pedro Sanchez, who offered on Monday to take in a rescue ship that was drifting in the Mediterranean sea with 629 migrants on board. Italy and Malta had refused to let it dock.

The government will draw up a draft law with the proposal, it said, which must be approved by parliament. Although the Socialists have a minority of 84 seats in the 350-member assembly, most parties back the proposal and it seemed certain to be approved.

“Healthcare is a right and the protection of health is essential,” government spokeswoman Isabel Celaa told a news conference.

Spain offers universal healthcare to its citizens. The former center-right government of Mariano Rajoy withdrew the right to general healthcare for undocumented migrants in 2012 as part of a program of spending cuts.

The government later reinstated some rights like access to emergency healthcare in 2015, but fell short of returning full coverage to an estimated 800,000 people residing in Spain without papers.

Spain receives a tiny percentage of the total asylum claims in Europe, and of those received it accepts fewer than the EU average, according to the Spanish Commission for Refugees.

However, the EU border agency expects illegal migration will rise again in 2018, potentially turning migration into a more pressing issue for Sanchez.