François Hollande announced that he would not seek reelection in 2017. He is the most unpopular president in the history of modern France, with an approval rating dropping as low as 4 percent. (James McAuley, Jason Aldag / The Washington Post)

François Hollande, France’s unpopular Socialist president, announced Thursday night that he would not seek reelection in 2017.

“I’ve decided not to be a candidate to renew my mandate,” he said on French television.

The announcement was unusual, as Hollande is a sitting president who is nearing the end of the first of two possible terms in office. But after consistently high unemployment figures and a string of terrorist attacks that killed more than 230 people in the last two years, he became the most unpopular president in the history of modern France.

A recent poll conducted by Le Monde newspaper placed Hollande’s approval rating at 4 percent.

Hollande’s decision opens the field for a leftist candidate to square off against François Fillon, who won both rounds of France’s conservative primaries last week, and Marine Le Pen, the outspoken leader of France’s far-right National Front party who has been steadily rising in the polls.

Had Hollande stayed in the race, analysts predicted that the spring 2017 general election would have been largely a contest between the center-right and the far right. But now there will be room for a leftist candidate without Hollande’s low approval ratings to fight for the presidency.

France’s leftist primaries will be conducted in January, but Manuel Valls, Hollande’s current prime minister, is already the favorite. Valls has said he is “ready” to compete in the election, although he has not formally announced his candidacy.

Emmanuel Macron, Hollande’s former economy minister, has announced he will run in 2017 as an independent candidate.

Despite his unpopularity, Hollande said in his speech that he had “only one regret — having proposed the ‘loss of nationality.’ ”

The provision, proposed in response to the November 2015 terrorist attacks in Paris that killed 130 people, would have stripped French citizenship from convicted terrorists who held dual nationality.

Ultimately abandoned, the proposed nationality law alienated much of the French left, which argued that it would have enshrined in the French constitution differences among citizens.

Some analysts see Hollande’s decision as a rapprochement with his own party, already in shambles before an election in which it will compete against strong right-wing candidates less than a year after Donald Trump was elected U.S. president and Britain voted to leave the European Union.

“He wants to end his term reconciled with the left,” said Patrick Weil, France’s preeminent historian of nationality and immigration. “He won’t run because it would divide it — he knows he hurt the left profoundly.”

France’s presidential election will take place in April and May 2017.