The election of François Hollande as the president of France in 2012 coincided with the high-water mark of Ed Miliband’s leadership of the Labour Party. That year, Labour posted its best local election results in 17 years, gaining 823 councillors and winning control of 32 councils in a performance that has not yet been surpassed or equalled.

Gazing across the Channel, the Milibandites were given hope. Hollande showed that a wonkish career politician could triumph over a charismatic centre-right incumbent.

The UK’s shattered Blairites looked to a different star rising in French politics: Manuel Valls. At the time of Hollande’s victory, Valls was the mayor of Évry, a small suburb of Paris, where he made a name for himself by campaigning against halal supermarkets.

His father, Xavier, was a Spanish painter and his mother, Luisangela, was Swiss-Italian. They met and married in Paris, and Valls was born in Barcelona while the couple were on holiday.

In 2009 Valls urged the Parti Socialiste (PS) to drop the adjective “socialist” from its name, and he ran for the presidential nomination two years later on what he described as a Blairiste platform. This included scrapping the 35-hour working week, which hardly applies outside of big business and the public sector but carries symbolic weight for the French left. Valls’s programme found few supporters and he came fifth in a field of six, with just 6 per cent of the vote.

Yet this was enough to earn him the post of interior minister under Hollande. While Valls’s boss quickly fell from favour – within six months Hollande’s approval ratings had dropped to 36 per cent, thanks to a budget that combined tax rises with deep spending cuts – his own popularity soared.

He may have run as an heir to Blair but his popularity in France benefited from a series of remarks that were closer in tone to Ukip’s Nigel Farage. When he said that most Romany gypsies should be sent “back to the borders”, he was condemned by both his activists and Amnesty International. Yet it also boosted his approval ratings.

One of the facets of French politics that reliably confuse outsiders is how anti-Islamic sentiment is common across the left-right divide. Direct comparisons with the ideological terrain of Westminster politics are often unhelpful. For instance, Valls supported the attempt to ban the burkini, saying in August, “Marianne [the French symbol] has a naked breast because she is feeding the people! She is not veiled, because she is free! That is the republic!”

By the spring of 2014, he was still frequently topping the charts – at least in terms of personal appeal. A survey for French Elle found that 20 per cent of women would like to have “a torrid affair” with the lantern-jawed minister, something that pleased his second wife, Anne Gravoin, who pronounced herself “delighted” with the poll. (She married Valls in 2010. He also has four children by his first wife, Nathalie Soulié.)

Yet it was a chilly time for the French left, which was sharply repudiated in municipal elections, losing 155 towns. Hollande sacked his incumbent prime minister, Jean-Marc Ayrault, and appointed Valls in his place. He hoped, perhaps, that some of Valls’s popularity would rub off on to him.

And perhaps Valls, a student of “Third Way” politics, hoped that he could emulate the success of Bill Clinton, who turned sharply to the right following Democratic losses in the US 1994 midterm elections and won a great victory in 1996. Under Valls’s premiership, Hollande’s administration swung right, implementing tough policies on law and order and pursuing supply-side reforms in an attempt to revive the French economy. Neither the economic recovery, nor the great victory, emerged.

With the date of the next presidential election set for 2017, Hollande was in trouble. His approval ratings were terrible and he faced a challenge from his former minister Arnaud Montebourg, who resigned from the government over its rightward turn in 2014.

Then, on 27 November, Prime Minister Valls suggested in an interview that he would challenge the incumbent president in the PS primary. After this, Hollande knew that his chances of victory were almost non-existent.

On 1 December, Hollande became the first incumbent French president ever to announce that he would not run for a second term, leaving Valls free to announce his bid. He duly stood down as prime minister on 5 December.

Under the French system, unless a single candidate can secure more than half of the vote in the first round of the presidential election, the top two candidates face a run-off. The current polls rate Marine Le Pen of the Front National as the favourite to win the first round, but she is expected to lose the second.

Few expect a PS candidate to make the run-off. So Hollande’s decision to drop out of his party’s primary turns that contest into an internal struggle for dominance rather than a choice of potential leader for France. The deeper question is: who will rebuild the party from the wreckage?

So although Valls has the highest international profile of the left’s candidates, no one should rule out a repeat of his crushing defeat in 2011.

He once hoped to strike a Blairite bargain with the left: victory in exchange for heresy. Because of the wasting effect of his years in Hollande’s government, however, he now offers only heresy. It would not be a surprise if the Socialists preferred the purity of Arnaud Montebourg.