The preliminary results show Macron leading with 24 percent, followed by Le Pen with 21.8 percent.  

Conservative candidate Francois Fillon and far-left Jean-Luc Melenchon both won 19 percent. 

The Socialist candidate, Benoit Hamon, is way down on 6.5 percent. 

Speaking separately at their campaign headquarters, Hamon and Fillon said they both took full responsibility for the election drubbing. The two called on voters to block the rise of the far-right candidate and to back Macron in the run-off.

The French prime minister, Bernard Cazeneuve, has joined his Socialist party’s defeated candidate Hamon and urged the party’s supporters back Macron in the second round.

"I solemnly call for a vote for Emmanuel Macron in the second round in order to beat the Front National and obstruct the disastrous project of Marine Le Pen that would take France backwards and divide the French people," Cazeneuve told the supporters at the Socialists campaign headquarters. 

Voters cast their ballots on Sunday under high-security measures after Thursday’s terrorist shooting in the French capital, in which a police officer and the gunman both died.

The election was too close to call with four frontrunners representing opposite poles coming tight on all polls, which made it the most unpredictable contest in years.

Polling for a projected second round pitting Macron against Le Pen have consistently shown the centrist winning by a very comfortable margin.

France's new president will be formally confirmed by mid-May.

The presidential election will be followed by a two-round legislative election to select the French parliament in June.

Anadolu Agency