PARIS — Amid heightened security, French voters began casting ballots for their next president Sunday in a first-round poll that’s being seen as a litmus test for the future of Europe and the spread of populism around the world.

More than 50,000 police and gendarmes were deployed to protect 66,000 polling stations for Sunday’s election, which comes just three days after a deadly attack on Paris’s famed Champs-Elysees Avenue in which a police officer and a gunman were slain. Another 7,000 soldiers are on patrol.

The presidential poll is the first ever to be held while France is under a state of emergency, put in place since the November 2015 attacks in Paris left 130 people dead.

Voters are choosing between 11 presidential candidates in the most unpredictable contest in generations. The current president, Socialist Francois Hollande, is not among them, having decided that his historic unpopularity would hurt his party’s cause.

“We really need a change in this country, with all the difficulties we are facing and terrorism,” Paris resident Alain Richaud said as he waited to cast his vote.

“There have been surprises (this year), there have always been scandals,” said Le Touquet resident Pierre-Antoine Guilluy.

Opinion polls point to a tight race among the four leading contenders vying to advance to the May 7 presidential runoff, when the top two candidates will go head to head.

Polls suggest far-right nationalist Marine Le Pen and Emmanuel Macron, an independent centrist and former economy minister, were in the lead. But conservative Francois Fillon, a former prime minister embroiled in a scandal over alleged fake jobs given to his wife and children, appeared to be closing the gap, as was far-left candidate Jean-Luc Melenchon.

France’s 10 percent unemployment, its lackluster economy and security issues topped concerns for the country’s 47 million eligible voters.

Voter Marie-Christine Colrat lamented: “Listen, too many candidates. And candidates that caused us a lot of problems, I think that’s not a good thing for France.”

The election is widely being seen as a vote on the future of the European Union — with most of the French candidates railing against its institutions.

Both Le Pen and Melenchon — from opposite extremes of the political spectrum — have supported pulling France out of the 28-nation bloc and its shared euro currency in a so-called “Frexit.”

A French exit, however, could spark a death spiral for the EU, for France and Germany are the bloc’s strongest economies and biggest proponents of a united Europe.

If either Le Pen or Melenchon wins a spot in the runoff, it will be seen as a victory for the rising wave of populism reflected by the votes for Brexit in Britain and Donald Trump in the United States.

“It’s definitely risky, but I have faith in the result even if an extreme candidate qualifies for the second round,” said Beatrice Schopflin, who was queuing to vote in Paris.

Macron and Fillon are committed to European unity and would reform the country’s restrictive labor rules.

The sun glistened across most of France on Sunday as voters — and candidates — cast their ballots. France’s Interior Ministry said voter turnout at midday was 28.54 percent — slightly stronger than it was in 2012, when turnout was high.

In the northern town of Henin-Beaumont, several activists from the feminist group Femen were arrested after staging a topless protest against the far-right Le Pen. Police intervened and stopped the commotion minutes before the candidate arrived to cast her ballot. No one was hurt.

Macron was the image of serenity as he posed for selfies with voters after casting his ballot in the northern coastal town of Le Touquet alongside his wife, Brigitte Macron.

Melenchon voted in Paris, as did Fillon.

But Fillon’s wife, the scandal-hit Penelope Fillon, was conspicuously absent from her husband’s side and voted 250 kilometers (155 miles) away near their 14th century manor house in Sarthe. She is facing preliminary charges for her role in the fake jobs scandal that has rocked her husband’s presidential campaign.

Hollande, the current president, voted in his political fiefdom of Tulle in Correze, southwestern France.

Political campaigning was banned from midnight Friday hours ahead of polls opening in France’s far-flung overseas territories such as Guadeloupe, French Polynesia and French Guiana, which all voted Saturday.

In Montreal on Saturday, thousands of French nationals waited in lines that stretched at one point up to eight blocks long to cast their votes, with many saying they were motivated to help keep the far-right out of power.

The interminable queue that lasted several hours was caused by lack of polling stations — only one was set up for the estimated 57,000 registered French voters in Canada’s most populous French-speaking city.

One retired American in Paris urged her neighbors to make their voices count.

“I think that it’s important that every French voter gets out and votes today … did you see what happened in the United States? The same could happen here,” said Renette Decicco, a 78-year-old out shopping for food.