Not even two months after taking office, Spanish Prime Minister Pedro Sanchez is facing his first significant political crisis. Last week, dramatic images of hundreds of African migrants jumping over the Ceuta border fence rocked public opinion. According to the Spanish Association of Civil Guards (AEGC), 22 police officers were injured in the assault, which ended with 602 people successfully reaching the Spanish exclave in Northern Africa.

The incident came in addition to the number of migrants crossing the Strait of Gibraltar in rafts, which has been above average this summer. Over 22,000 migrants have reached Spain illegally from Africa, according to data from the Spanish Interior Ministry. The summer weather and the closure of the Italian and Greek routes are the main drivers behind the increase in numbers.

Read more: How far will southern Spain's resources for refugees go?

Rapid fire against Sanchez

The crisis couldn't have come at a worse time for Pedro Sanchez and his Socialist Workers' Party (PSOE). On July 27, his administration suffered its first serious blow, when his party's deficit ceiling proposal was rejected by the Congress. Most of the parties that had supported his no-confidence vote against Mariano Rajoy abstained, inflicting a first defeat on Sanchez.

However, analysts are not expecting the migration headlines to dent Sanchez's unity with his partners.

"The government is in a weak position, given the diversity of the parties it depends on to bring any initiative forward," political scientist José Fernandez-Albertos of the Spanish National Research Council (CSIC) told DW. "Despite that, this shouldn't be a difficult topic to negotiate, even if there are unexpected turns," he added.

Political journalist Cristina Fallaras points out that the government's problem is not so much with its partners as it is with the opposition, which will try to politicize the issue. Sanchez, she told DW, must make a choice: "The government is undecided about whether to take a harder or a softer stance on the topic, and I think it's a lose-lose for them."

Has Pedro Sanchez' open arms policy on migrants backfired?

Fernandez-Albertos thinks that migration can be beneficial for Spain in the long run. However, short-term, it is the spectacular images in the media that leave an impression on the Spanish collective consciousness. "People watch TV and see how public order is disturbed on beaches or towns they know. They see overwhelmed policemen unable to contain something they don't understand. They would like to see things come back under control," he said. "Even when there's a small number of people coming in, the issue's media visibility is very high. This can change the terms of the debate."

This could be deterring the government from taking an open arms stance, such as the one adopted with the Aquarius flotilla in June [Following Italy's refusal to take in hundreds of migrants, the Spanish government agreed to let the boat dock in Valencia.]

"The PSOE is aware that its electorate is relatively old and often distrusts open borders policies. They know their political rivals will use this. They already are," Luis Cornago, an independent political analyst specializing in far-right populism, told DW.

The right-wing competition is on

Meanwhile, the newly elected president of the conservative People's Party (PP, the largest opposition party), Pablo Casado, adopted a distinct anti-immigration position last Sunday. Casado tweeted that "millions" of Africans are waiting to cross over to Europe. "There can't be papers for all," he tweeted, adding that "we have to say it even if it's politically incorrect." Three days later Casado travelled to the south and was photographed shaking immigrants' hands.

Casado's tweet was immediately seized upon by the other major right-wing leader in Spain, Albert Rivera, who heads the liberal Ciudadanos party. Rivera visited Ceuta on Monday, where he accused the government of creating a "pull effect."

Luis Cornago thinks there may be an underlying anti-migration sentiment within the population and that right-wing parties, particularly the PP, may be looking to exploit it. According to him there is a significant portion of the population that has concerns about the increased competition for economic resources. "This topic can be politicized and if there's a political party offering that narrative, there's a chance that a part of the population will support it."

Spain's right-wing parties could take advantage of a shift in public opinion on migrants

This, he said, is exactly what PP is doing: "The Catalan issue has not worked well for them — Ciudadanos seems to have won that battle. But Casado's voters are typically older, a demographic more prone to have blinkered views on migration."

Cristina Fallaras agrees that the opposition is trying to find votes using a hard-line narrative inspired by Italy's interior minister, Matteo Salvini. She thinks that Casado's move is just the latest development in a chain of events that goes back to the no-confidence vote. "Until that day, PSOE had always preferred to ally with Ciudadanos rather than with the left-wing Podemos and the peripheral nationalists, but now Ciudadanos is competing openly with the PP for right-wing voters," she said.

Fallaras also noted that the ferocity of the debate had come as a surprise. "Nobody was expecting such a battle on the field of xenophobia," she said, while pointing out that it coincides with the mobilization of two other far-right narratives: Neo-Francoism and a sexist backlash against feminism. "This is a very dangerous stance, because if somebody actually gets votes from these narratives, they'll become a slippery slope. They won't stop."

Watch video 02:44 Share Migrants find new route Send Facebook google+ Whatsapp Tumblr linkedin stumble Digg reddit Newsvine Permalink https://p.dw.com/p/32QpI Strait of Gibraltar becoming popular migrant route

Every evening at 1830 UTC, DW's editors send out a selection of the day's hard news and quality feature journalism. You can sign up to receive it directly here.