LESS THAN 18 months ago, Marine Le Pen was beaten and exhausted. She had lost the French presidential run-off to Emmanuel Macron, after a wild-eyed debate performance that left her fans aghast. Her leadership of the National Front, a party of blood-and-soil populists, was strained, and she was said to be depressed. Within months, she lost her closest ally, Florian Philippot, and found her party’s French bank accounts unexpectedly closed.

Yet there she was in Rome on October 8th with a new glint in her eye. Alongside Matteo Salvini, Italy’s interior minister, a beaming Ms Le Pen railed against “totalitarian” Europe and proclaimed the start of a new “history with a capital H”. Populism and nationalism may have been defeated at the ballot box in France in 2017. But Ms Le Pen is hoping that next May’s elections to the European Parliament will show that her party, renamed the National Rally, is still a force to be reckoned with.

Thanks to a turnout that is usually low, and the opportunity for a low-risk protest vote, the French far right has often done well at European polls. In 2014 the National Front came out on top in France, with 25% of the vote. Next year’s ballot will be the first mid-term electoral test for Mr Macron. After a summer of poorly handled scandals and offensive remarks, the president’s popularity ratings have tumbled. This week Mr Macron was struggling to reshuffle his government, more than a week after his interior minister, Gérard Collomb, resigned after complaining that the president lacked humility. Next May’s election will be “very complicated”, says one of his deputies. “The risk is that the vote turns into a referendum on him.” As it is, one poll puts Ms Le Pen’s outfit neck-and-neck with Mr Macron’s La République en Marche, on about 20%, comfortably ahead of all other parties. Ms Le Pen could well come out on top again. “The populist wind is blowing everywhere,” warns Xavier Bertrand, president of the Hauts-de-France region, who beat Ms Le Pen to that job in 2015.

Ms Le Pen hopes to benefit from this breeze. More importantly, she has enacted a strategic shift on Europe that could make the National Rally a less alarming prospect for certain voters. After the Brexit referendum in 2016, and steered by Mr Philippot, then a party vice-president, Ms Le Pen became a Frexiteer. A party poster at the time showed a pair of fists breaking their shackles next to the slogan: “Brexit, and now France!” Last year she campaigned for a referendum on EU membership and a return to a “national currency” in place of the euro. Pensioners feared for the value of their savings. At first-round voting last year, only 10% of the over-70s voted for Ms Le Pen—less than half her overall total.

As post-election recriminations flew within the party, however, Mr Philippot quit, and Ms Le Pen revised her Europe policy. Out went the promise of a membership referendum and the confused talk about a new currency. In came a pledge to work towards a reformed “Europe of nations”. This was her songbook in Rome when she met Mr Salvini, another reformed Leaver. Together they promised to reshape the EU and free it from the clutches of “those holed up in the Brussels bunker”. Ms Le Pen is no longer in favour of quitting the EU, but of conquering it. (Cynics might note that “in Europe, but not ruled by Europe” was the refrain of many Conservative leaders in Britain.)

It was a measure of renewed confidence that Ms Le Pen also used her visit to Rome to distance herself from Steve Bannon. Although previously eager to welcome Donald Trump’s former strategist, she now seems keen to show that her pan-European ambitions are not the work of an American. Ms Le Pen still faces difficulties at home. A court has ordered her to undergo a psychiatric test in connection with a case, brought under an absurd law, for tweeting images of Islamic State violence. In a separate investigation into payroll abuse, a court has seized €1m ($1.15m) of public subsidies from the party. Yet this week is a reminder that France’s nationalists were defeated in 2017, not crushed.