WHEN Albert Rivera gave a talk at a regular breakfast meeting for business folk at the Ritz Hotel in Madrid last month, more than 600 people turned up, a record for the event. He has suddenly become Spain’s hottest ticket, almost three years after he leapt into national politics at the head of Ciudadanos (“Citizens”), a newish liberal party. In December Ciudadanos became the biggest single force in Catalonia at a regional election. Now it is jostling the ruling conservative People’s Party (PP) at the top of the national opinion polls. That has made the government of Mariano Rajoy, the long-serving prime minister, palpably nervous.

“The big question is whether it will be like France,” Mr Rivera told The Economist this week. There Emmanuel Macron, to whom he feels politically close, swept aside an ossified two-party system last year. In Spain, Socialist and PP governments have alternated since the 1980s. This cosy duopoly was weakened by the long recession that followed the bursting of Spain’s housing bubble in 2007. At first the Socialist vote looked the more vulnerable to a takeover by Podemos, a far-left upstart. Ciudadanos surged in the opinion polls in 2015 but managed only 14% and 13% in elections that year and in 2016. The PP clung on, albeit as a minority government. Ciudadanos has facilitated this but has not joined it.

Mr Rivera (pictured) admits that his party’s success in Catalonia, where it won 25% (the PP got just 4%) thanks to its resolute opposition to separatism, helped its recent poll bounce. But he also thinks a structural political shift is under way. Many in Madrid’s political world agree.

Mr Rajoy does not have to call a fresh election until 2020, but there will be municipal and regional polls in May 2019. Ciudadanos now looks more likely than in 2015 to displace the PP as the main party of the centre-right, just as Mr Rajoy’s party in the 1980s replaced the short-lived Union of the Democratic Centre of Adolfo Suárez that presided over the transition from dictatorship to democracy. Some PP activists (as well as some Socialists) have recently sought to join Ciudadanos, according to Mr Rivera. Not all are admitted.

The PP looks tired and old (most of its voters are over 55). Mr Rajoy has governed since 2011 and has led his party for 14 years. He can claim credit for an economic recovery which has seen three consecutive years of growth of over 3% and a big fall in unemployment (though at 16.5% it remains high). But his government has struggled with Catalonia, where the separatist administration of Carles Puigdemont unilaterally declared independence after an unconstitutional independence referendum in October. Mr Rajoy, with the backing of the Socialists and Ciudadanos, deployed emergency powers to dismiss Mr Puigdemont, but too late to prevent a crisis. The PP has also suffered from a string of corruption scandals. Many are fairly small-scale and occurred years ago. Nevertheless, corruption acts like “a fine rain that could erode the capacity of the PP to resist”, says Sandra León, a Spanish political scientist at York University. By contrast, Ciudadanos looks young and energetic. Mr Rivera is 38, a fast-talking lawyer who already has a dozen years’ experience in politics. His party was formed by disillusioned Catalan Socialists who disliked temporising with nationalists. Last year Mr Rivera repositioned it as a centrist, progressive liberal party. “We have to move away from the old left-right axis,” he says, echoing Mr Macron. “The big battle of the 21st century is between liberalism and the open society, and populism-nationalism and the closed society.” Ciudadanos is keen on fighting monopolies and on vigorous Scandinavian-style labour reforms to help the unemployed retrain and find jobs. It wants to shake up the political and electoral systems, and education, to tackle Spain’s still-high rate of school dropouts. It is fiercely pro-European. But Mr Rivera says his party is part of a “worldwide movement”. As well as Mr Macron, he cites Italy’s Matteo Renzi, Canada’s Justin Trudeau and Liberal parties in Benelux countries and Scandinavia as soulmates. “For the first time PP voters have an alternative,” says Cayetana Álvarez de Toledo, a former congresswoman for the party. Since the separatists won a narrow majority of seats in the Catalan parliament, the next election is likely to be played out on the question of Spanish unity. “That’s very favourable for Ciudadanos,” she adds.

Mr Rivera argues robustly against separatism. “Either we take nationalism seriously as a threat to Europe or they carry on winning,” he says. He would not claw back powers from Catalonia but says he would use the constitution to prevent indoctrination in schools and the promotion of independence by Catalan public television. Beating separatists requires “a strong national project” that “inspires”. This requires constitutional reform—something the PP is cool about—but for its own sake, not just to defeat separatism.

The Catalan conflict seems to have shifted Spanish public opinion to the right, hurting Podemos and becalming the Socialists. That leaves a broad space for Mr Rivera, but it may also help Mr Rajoy. Mr Rivera says that Ciudadanos is more prepared and better organised than in 2015. But the PP is no pushover. It has the strongest organisation of any party. “We have to get the message [of the polls] and act,” says Pablo Casado, a PP official.

The party is organising meetings to brush up its policies and to try to fire up its base ahead of the local elections next year. Mr Casado says it will also push initiatives in parliament even at the risk of having them voted down, starting with a measure to lengthen prison sentences for some crimes. Mr Rajoy, who often ignores Ciudadanos, recently seemed to acknowledge its challenge by criticising it for flip-flops on this and other policies. If Luis de Guindos, the economy minister, wins his bid to join the board of the European Central Bank, Mr Rajoy may use his departure for a wider government reshuffle.

Mr Rajoy has often been underestimated. His stolid manner hides a quick brain and sharp political instincts. He offers the voters stability and experience. Clearly, Mr Rivera still has a lot of work to do. But battle has been joined.

Update (February 9th): The chart in this piece has been updated to reflect a new poll.