The Socialists could theoretically choose their candidate this weekend but unless the victor in the field of seven gets 50% plus one vote there will be a second round of voting on January 29 between the two best performers on Sunday.
Whoever wins the January 29 primary run-off will face the April-May presidential election battling more popular candidates from the far right to the far left riding frustration with immigration and economic stagnation.
The extremely poor popularity rating of outgoing Socialist President Francois Hollande - who is not running for a second term - has dragged down public opinion on the Socialists as a whole, leaving the party badly divided.
Arnaud Montebourg, the anti-austerity former finance minister, who was leading in surveys, conceded his defeat - he came in third - and endorsed Hamon in the run-off next Sunday.
Indicators point to independent candidate and former Socialist economy minister, Emmanuel Macron, conservative candidate Francois Fillon and far-right leader, Marine Le Pen, competing in the first round of the presidential race.
Mr Valls paints himself as a bastion against populism and would continue pro-business reforms. "We are talking about the need to unite for the future of the Left and of France in general", Montebourg said.
Valls, 54, in combative mood, suggested that Hamon stood no chance of pulling off victory in spring and that he alone would be able to turn the tide against the odds.
Exit polls gave Hamon, a radical reformer of social and environmental policy, between 33 percent and 35 percent of votes, with Valls trailing at the 30 percent level. Montebourg had about 18 percent.