Whoever wins the two-round primaries on November 20 and 27 has a strong chance of becoming France's next president because of the divisions of the left and persisting opposition among a majority of voters to the far-right taking power.

Donald Trump's election to the US presidency loomed large in France as rightist rivals clashed for a Thursday debate on France's public television. Ex-president Nicolas Sarkozy, who is running neck-and-neck with former premier Alain Juppe in polls, said Trump's vowed isolationism could create "a fantastic opportunity for France and Europe to re-establish a leadership role" on issues including security in the Mediterranean and the reform of the UN Security Council.

"The next five years will mark the return of France and Europe to the international scene. America won't be there to put us in the shade," Sarkozy said. But the ex-president wilted under scrutiny after a debate question quizzed him over claims he'd received millions in campaign funding from the late Libyan President Moammar Gadhafi.

"Aren't you ashamed to repeat claims by a man who has spent time in jail?" Sarkozy retorted during the televised debate, referring to a Franco-Lebanese businessman who claims to have acted as courier with millions of euros between Tripoli and Paris in 2007.

Yet he did not answer the question.

All eyes are on the right-wing nominating contest, whose winner is expected to go on to take the presidency in May in a head-to-head with far-right leader Marine Le Pen whose far-right National Front (FN) is polling around 25 percent, well ahead of the incumbent Socialists. France's presidential election almost invariably involves an inital vote followed by a run-off between the two strongest first-round candidates.

Trump's victory in the US contest has "made possible what had previously been presented as impossible," Le Pen said in a recent BBC interview.

Responding to Trump's campaign threat to help NATO allies only if they paid their own way, Juppe said EU members needed to speed up plans for greater defense cooperation.

An Ifop survey on Thursday put both Sarkozy and Juppe at 31 percent, ahead of the reform-minded Francois Fillon, up 7 percent in two months to 27 percent.

As the right prepares to pick its nominee the ruling Socialists are in disarray. Earlier this week, President Francois Hollande's former star economy minister Emmanuel Macron became the latest to repudiate his mentor, announcing a bid to become president on an indepent ticket.

Hollande himself has yet to say whether he will seek a second term, amid rumors that his prime minister, Manuel Valls, is aiming to run in the unpopular head of state's stead.

Following the unexpected victories of Donald Trump in the United States and the UK vote to leave the European Union, polls in France are increasingly being greeted with skepticism. The presidential election takes place on April 23, with the runoff on May 7.

jar/msh (AFP, Reuters)