Garvan Walshe is a former national and international security policy adviser to the Conservative Party. He runs TRD Policy.

What if you called a culture war and nobody came?

That’s the question faced by the leaders of Spain’s Partido Popular (the mainstream conservatives), and Vox (a new hard right party) as they contemplate the wreckage of an election campaign in which the opponent they had demonised (the socialist Pedro Sanchez) increased his party’s seats by a third and looks set to govern for the next five years.

Pablo Casado had taken over the PP last summer after his predecessor’s minority government had been ousted by Sanchez through parliamentary maneouvering following the culmination of an eternal illegal party funding scandal. He ran in the leadership election as the change candidate. In reaction to his the centrism of his predecessor Mariano Rajoy, Casado promised una “derecha sin complejos”, a spanish phrase we would recognise as “sound” Toryism. He won decisively and made the fight against Catalan secession his leitmotif.

He continued with a solidly conservative social policy agenda, proposing to tighten abortion laws and questioning other social changes that had taken place in Spain. He married this with a strongly Thatcherite economic programme, promising lower taxes and deregulation.

This was probably what he always believed. It was also a way to carve out clear blue water from the centre-right Ciudadanos party that had been nipping at the PP’s heels. He might lose votes to Ciudadanos to his left, but his unrepentantly sound position would keep his right flank secure.

Reasonable though this plan may have seemed, it would founder on the appearance of a party even more sound: Vox, which played UKIP to Casado’s Conservative Way Forward. Vox’s emergence at first appeared to help Casado, because though Vox took the “ultra” vote for itself, and in regional elections in Andalucía took some 12 per cent of the vote, it, together with PP and Ciudadanos and enabled PP and Ciudadanos to sustain a coalition in what has long been a traditional socialist bastion.

Vox itself is loud, nationalist, and deliberately offensive in style — its manifesto of 100 proposals was long on sexism, bullfighting, and ancient glories of the Spanish empire. Fronted by Santiago Abascal, who had been a target of the Basque separatist ETA, Vox grabbed attention by condemning “feminazis” and the “Islamic invasion” of Spain. Abascal became an aficionado of Soros conspiracy theories, but considers himself pro-Israel. When a Vox candidate was found to be a Holocaust denier, he was swiftly dismissed, to the consternation of activists.

The difficulty this posed Casado was that he couldn’t out-Vox Vox. His right turn not ended up not only losing his votes to his left, but was insufficient to stem the flow to his right wing. Rather than expand the right wing coalition, Vox helped itself to support which Casado thought was rightfully his.

On election day Casado failed to staunch the loss of votes, not only to Ciudadanos, but even to the socialist PSOE. He legitimised Vox’s culture war without reaping any of the benefit.

It was a culture war fought on decidedly ill-chosen territory. Vox decided to concentrate on immigration, the so-called Islamic threat, the “feminist supremacists”, and alleged threats to bullfighting. Topics that excite a few Spaniards – but only a minority. They even jumped the shark when Abascal decided to make gun ownership an issue, as though importing a carbon copy of the US right wing movement. He ended up being condemned by the police, who said they did’t want any more school shootings.

In the end Vox’s obsession with Islam far exceeded that of ordinary Spaniards. Abascal even launched his campaign in Covadonga, in the northern region of Asturias, famous as the first victory of the Christians against the Moors (in 722!). Casado rushed rightwards to try and match this extremism, further alienating centrist voters and motivating the left to turn up to the polls.

Casado was guilty of the most basic political sin — failing to design a campaign based on what the people actually think. Opinion polling has consistently shown that Spaniards’ main concerns were corruption and unemployment (even Vox voters were not predominantly worried about immigration). Given that the corruption scandals were the PP’s own, it would have been difficult for the PP to make running there, but economic policy has been their strong suit. It was the PP that brought the country out of the crisis, restored healthy rates of economic growth and brought unemployment down. It should have run on that record, and developed policies to target the specific problems the Spanish economy faces (which include young men who gave up school to work on construction sites during the boom but who became unemployable in the bust). To do that, however, Casado would have had to endorse his predecessor’s work.

Instead, he finds his party reduced to 66 from 137 seats, and his opponents increased to 123 from 85. Ciudadanos at 57, are nipping at their heels, while Vox only got 24, fewer than the Catalan separatists.

Pablo Casado has a new nickname now: Fracasado. It translates as “failed”.