A left-wing alliance has won the most seats in the French parliament, thwarting the far right in a stunning result to Sunday’s second-round vote.

Despite avoiding a far-right government, the result means France is plunged into political limbo, with no party reaching an absolute majority, leaving parliament gridlocked.

The left-wing New Popular Front won 182 seats, while President Emmanuel Macron’s centrist Ensemble alliance won 163 seats.

The far-right National Rally and its allies, which took a commanding lead in the first round, slumped to third place due to tactical voting, winning 143 seats.

Jean-Luc Mélenchon, the veteran left-wing firebrand seen by his critics as an extremist, wasted no time in proclaiming victory.

"The president must call on the New Popular Front to govern," he told supporters in Stalingrad square, insisting Mr Macron had to recognise that he and his coalition had lost.

His alliance, drawn up in a hurry for President Macron's surprise election, includes his own radical France Unbowed, along with Greens, Socialists and Communists and even Trotskyists. But their victory is nowhere big enough to govern.

France is going to have a hung parliament. None of the three blocs can form an outright majority by themselves of 289 seats in the 577-seat parliament.