He is a radical left-winger often described as a Gallic Bernie Sanders, and was viewed as a complete political outsider just three weeks ago.
Benoit Hamon handily won France's Socialist Party primary on Sunday, making him the party's best hope to maintain its grip on power in presidential elections this spring.
A clear majority of the more than 1.3 million voters in the primary cast ballots for Hamon, crushing the political hopes of former Prime Minister Manuel Valls, an economic liberal who had been seen as the favorite heading into the election.
The Socialists have governed France under the increasingly unpopular President Francois Hollande for four years, and are given little chance in the presidential election this spring. But as Hamon has already demonstrated, political fortunes can change.
Hamon, 49, ran on an anti-capitalist and anti-globalization platform, pledging to introduce a monthly "universal income" for all citizens, to consult the French people in major legislation and to legalize marijuana.
He topped seven other left-wing candidates in the first round of the Socialist Party primaries a week ago and defeated Valls in the second round on Sunday by 58% to 41%.
Hamon was education minister in François Hollande's Socialist administration but resigned after disagreeing with the government's broad social democrat economic policy.
He will now face the official opposition candidate François Fillon, of the center-right Republicans party, the far-right National Front candidate Marine Le Pen as well as independent candidates, including business-friendly former Economy Minister Emmanuel Macron, in the presidential elections that take place in April and May this year.
Fillon, who is anti-abortion and conservative and has proposed major public sector job cuts, was widely considered a favorite but is currently embroiled in a scandal over employing his wife as a parliamentary aide. On Sunday, Fillon told supporters at a rally to "leave my wife out of the political debate."
Le Pen, who is running on an anti-immigrant, anti-European Union platform, has pledged to put "native" French people first.
France has now four clear choices for its next leader: the left-wing Hamon; the centrist Macron; the traditional conservative Fillon; and the far-right Le Pen.
Willsher is a special correspondent