Ireland and Belgium also oppose the return hubs. Like Dublin, Madrid this year formally recognised Palestine as a state and is among the EU governments critical of Israel’s war in Gaza.
But Spain has not always had such liberal immigration policies. In 2005 another socialist prime minister, José Luis Rodríguez Zapatero, put a double six-metre fence around the Spanish North African territories of Ceuta and Melilla in a bid to stem migratory movements mainly from West African nations across Europe’s southernmost borders.
Blanca Garcés, a senior research fellow at the Barcelona Centre for International Affairs think-tank, said: “Spain’s position is mixed: it is a total exception within Europe in its policies of regularisation for migrants who are in the country illegally but when it comes to tough borders it was a pioneer with the border fences built around Ceuta and Melilla.
“It’s not about whether immigration is good or bad, but about managing immigration properly. The labour market attracts immigrants to precarious jobs, and if you then have a saturated housing market and overloaded social services like Spain’s, conflict will develop.”
Dr Barrio agrees that Mr Sánchez is playing with fire as he seeks to benefit from political polarisation on the sensitive issue of immigration.
“Spain needs manpower but it cannot accommodate it due to lack of infrastructure. This will generate undesirable situations that will only boost the case of those anti-immigration forces like Vox,” she said.
Trusco Antonio, a 29-year-old immigrant from Equatorial Guinea who now lives in Móstoles, southern Madrid, said he supported Mr Sánchez’s policy of making it easier for migrants to get legal papers after he spent close to six years in an irregular situation in Spain.
“But what is the point of being legal if you can’t afford to pay rent? The government needs to get a handle on housing,” Mr Antonio told The Telegraph.
Like the French president Emmanuel Macron, Mr Sánchez may end up regretting gambling the centre for political gain. Mr Macron’s gambit of calling a snap summer election to halt the march of the far-Right National Rally led to him being saddled with a conservative government.
“This climate of polarisation can come back and hit you like a boomerang,” warned Dr Barrio.