WHEN the French voted in 2000 to shorten their presidential term from seven years to five, the result was to accelerate the rhythm of political life. The next presidential election is not due until 2017, but the race is already under way, the more so after two party-leadership elections this weekend. On November 29th Nicolas Sarkozy, who was president in 2007-12, was elected head of the centre-right UMP. The next day, Marine Le Pen was re-elected leader of the populist National Front. The contours of the next presidential contest are beginning to take shape.

Mr Sarkozy’s result was decisive but not crushing. Party members gave him 65% of the vote, well below the 85% he won when he first ran for the leadership in 2004. His closest rival, Bruno Le Maire, a former minister, secured fully 29%, better than expected. With a tireless campaign across the country, Mr Le Maire earned some support on his own account. But he also drew an anti-Sarkozy vote from those wishing to block the former president’s comeback. They want either Alain Juppé or François Fillon, both former prime ministers, as the party’s candidate in 2017 instead.

Mr Sarkozy’s job of unifying the party is both urgent and challenging. Since he vowed to retire from public life after losing the 2012 presidential election to François Hollande, a Socialist, he has watched the UMP tear itself apart. “The level of hatred between us is astounding, grotesque,” Mr Sarkozy told his party’s deputies this week. He urged a “new start”, and promised to change the party’s organisation and name. He invited Mr Le Maire to travel with him to meet Germany’s Angela Merkel at her party’s congress in Cologne on December 8th. And he lunched with Mr Juppé and met Mr Fillon, helping to “clear the air”, according to a deputy close to Mr Fillon.

In perhaps his boldest move, Mr Sarkozy put an ally of Mr Le Maire, Thierry Solère, in charge of the party’s presidential primary, due in late 2016. Mr Sarkozy may have majority support among card-carrying UMP members. But Mr Solère plans to expand the primary to all voters who declare that they support the right and centre, which could open the race wider. A recent poll made Mr Juppé the favourite among all voters (including the left), with 36% to 21% for Mr Sarkozy. All the same, nobody underestimates Mr Sarkozy’s skill at manoeuvring things his way. By promoting Mr Le Maire, who has not declared his own candidacy for the primary, Mr Sarkozy may also be undermining his strongest rival, Mr Juppé.

For Mr Hollande, Mr Sarkozy’s comeback could actually be good news. With his popularity as president at a record-breaking low of 13%, the Socialist leader faces potential rivals within his party in 2017. Yet such is the loathing of Mr Sarkozy on the left that his return to the airwaves and to public debate could help to bond Socialist deputies. This week Bruno Le Roux, the Socialists’ parliamentary leader, spoke of a “form of vulgarity” about the former president. Such visceral dislike could, in turn, boost Mr Sarkozy, who thrives on a sense of victimisation.

Yet the greatest threat to both Mr Sarkozy and Mr Hollande comes not from each other, but from Ms Le Pen, who was re-elected with a Soviet-style 100% of the vote. With little fanfare, she is quietly building credibility, organisation and support for 2017. Some polls suggest that she will make it to the second-round run-off, and may even come top in the first round. Nothing would more delight a leader who denounces the unchanging face of the political elite than to be up against exactly the same pair of mainstream candidates whom she faced in 2012.