PARIS -- French Prime Minister Manuel Valls stepped down Tuesday to focus on running for president in next year's election and was replaced by Interior Minister Bernard Cazeneuve, a man who embodies the fight against Islamic extremism.

Valls resigned a day after announcing his candidacy in the wake of President Francois Hollande's decision not to run for a second term last week.

Valls hopes to unite Socialists and give the left a chance to stay at the Elysee Palace despite current opinion polls suggesting the second round of the election could pit Marine Le Pen, the leader of the far-right National Front, against conservative Francois Fillon.

The 53-year-old Cazeneuve is a close ally of Hollande and became a popular figure in French politics as the champion of measures tackling extremism in his interior minister role.

Cazeneuve was appointed interior minister in 2014 and had to supervise the response to a series of attacks that have claimed more than 200 lives since January 2015. In total, he championed three counterterrorism laws and one intelligence law. He has also been in charge of implementing France's state of emergency following the Paris attacks that killed 130 people.

After a brief meeting with Valls at the Elysee, Hollande posted a message on Twitter announcing Cazeneuve's appointment, which was also confirmed by the presidential palace press office.

Bruno Le Roux, the head of the Socialist group in Parliament's lower house, was appointed as the new interior minister.

A leading yet divisive figure of the Socialist party, Valls is known for his outspoken, authoritarian style and his tough views on immigration and security.

Valls is the top contender in the primary next month for Socialist candidates and their allies before France's two-part presidential election in April and May. But he will face tough competition from fellow Socialists.

Valls has been harshly criticized by members of his own party after championing tough labour reforms and endorsing a controversial ban last summer on the Islamic "burkini" swimsuit.

Cazeneuve was the mayor of the northern city of Cherbourg-Octeville for more than a decade before being appointed to government minister positions since 2012.

Widely regarded as a hard worker, Cazeneuve was Hollande's spokesman during the president's winning campaign in 2012 and the two enjoy a trusting relationship.

------

Samuel Petrequin contributed to this report.