Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

French voters have begun casting ballots for the presidential election in a tense first-round poll that's seen as a test for the spread of populism around the world.

More than 60,000 polling stations opened amid tight security across the country on Sunday, following an attack in Paris on Thursday which left a police officer dead.

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, 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 voters' concerns.

In Paris, voters were lining up early at polling stations.

The vote "is really important, mainly because we really need a change in this country with all the difficulties we are facing and terrorism," said Paris resident Alain Richaud.

The French government has mobilized more than 50,000 police and gendarmes to protect polling stations, with an additional 7,000 soldiers on patrol.

Opinion polls showed a tight race among the four top contenders vying to get into the May presidential 7 runoff that will decide who becomes France's next head of state. But the polls also showed that decision was largely in the hands of the one-in-three voters who are still undecided.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Xavier Jugele, the French policeman killed during the attack on the Champs Elysees Avenue in Paris. AFP - Getty Images

The deadly attack on police Thursday night on Paris' Champs-Elysees Avenue clouded the last days of campaigning. Security is a prominent issue after a wave of extremist attacks on French soil, including the gunman who killed the Paris police officer Thursday before being shot dead by security forces. The gunman carried a note praising the Islamic State group.

Le Pen and Fillon canceled their last campaign events Friday over security concerns. Macron did too, but also accused his rivals of trying to capitalize on the attack with their anti-immigration, tough-on-security messages.

In a sign of how tense the country is, a man holding a knife caused widespread panic Saturday at Paris' Gare du Nord train station. He was arrested and no one was hurt.

Well-wishers paid their respects Saturday at the site of the shooting, which was adorned with flowers, candles and messages of solidarity for the slain police officer, Xavier Jugele. Across from the Eiffel Tower, women from the group Angry Wives of Law Enforcement demonstrated against violence aimed at police.

Some believed French stoicism would prevent a lurch to the right in the presidential vote, even though the attack dominated French headlines.

Louis Aliot, one of the vice-presidents of the French far-right National Front (FN) party, walks past electoral posters in Perpignan. RAYMOND ROIG

"These 48 hours are not going to change everything ... terrorism is now an everyday occurrence. It's permanent, 24 hours a day. So we're not afraid. If we're believers in freedom, we must live with it," said Marise Moron, a retired doctor.

"I'm not going to let myself be influenced by people who are trying to frighten us," Paris resident Anne-Marie Redouin said near the heavily-guarded Eiffel Tower.

Others, fearful that Le Pen has been strengthened by the instability, said they would shift their votes from fringe candidates to make sure to keep the far-right out of power.

"With an attack such as this one, I think the National Front will get a good result. Therefore I'll change my intention and cast a useful vote — either Melenchon or Macron," said physics teacher Omar Ilys, 44.

When the French vote for president, their choice will resonate far beyond France's borders, from Syrian battlefields to Hong Kong trading floors and the halls of the U.N. Security Council.

The election is also widely being viewed as a ballot on the future of the 28-nation European Union. The far-right Le Pen and the far-left Melenchon could pull France out of the bloc and its shared euro currency — a so-called "Frexit."

A French exit could ignite a death spiral for the EU, the euro and the whole idea of European unity that was borne out of the bloodshed of World War II. France is a founding member of the EU and its main driver, along with Germany.

Financial markets are already jittery over a possible Frexit, fearing capital flight, defaults or lawsuits on bonds and contracts. Le Pen's team is downplaying possible apocalyptic scenarios and arguing that the euro — which is now used by 19 nations — is headed for a breakup eventually anyway.

If Le Pen or Melenchon win a spot in the runoff, it will be seen as a victory for the populist wave reflected by the votes for Donald Trump and Brexit — the British departure from the EU. Many French workers who have lost out by globalization are similarly fed up with establishment parties and attracted by promises of ditching the status quo.

Alternatively, if neither candidate makes it past Sunday's first round into the runoff, that's a clear message that populist nationalism is receding.

Macron and Fillon are committed to European unity and would reform labor rules. Macron has framed himself as a bulwark against Trump's protectionism.

Le Pen and Melenchon blame free trade pacts for killing French jobs and want to renegotiate them.