French conservatives headed to the polls Sunday to vote for the first time in a nationwide primary for their nominee in next year's presidential election, the latest global test of rising populism and anti-elite sentiment following Donald Trump's victory in the U.S. and Britain's Brexit vote.

Lines were long at polling stations across France as voters could choose among seven candidates in the first round of the primary, according to the Associated Press. More than 2.5 million people had cast their ballots by 5 pm, which party officials said indicated that turnout would be high.

The French election is being closely watched in Europe where politics have been dominated by growing concern over the flood of migrants, terrorist attacks in France and Islamic extremism.

The top three candidates are former president Nicolas Sarkozy, 61, and former prime ministers Francois Fillon, 62, and Alain Juppe, 72. All three have focused their campaigns on immigration and security.

After Sunday's first round of voting, the two top vote-getters will compete in a runoff Nov. 27.

The winner could have a strong chance of winning next year because of the deeply unpopular presidency of Socialist François Hollande. The Socialist Party will hold a two-round primary in January.

Polls expect whoever wins the conservative primary to face far-right leader Marine Le Pen in a presidential runoff next May.

The outcome of the primary is difficult to predict as this marks the first time conservatives have organized one in France. Nominees were previously designated by the party.

"This is something very new for the French right," historian Jean Garrigues told FRANCE 24.

Anti-immigrant and anti-Muslim sentiment in France has boosted the candidacy of Le Pen of the National Front Party, who has been emboldened by Trump's election.

In June, voters in the United Kingdom approved a referendum for the nation to leave the European Union, known as Brexit, sending shockwaves throughout Europe.