France said its security forces were fully mobilised for a presidential election at the weekend after the killing of a policeman by an Islamist militant threw a dark shadow over the last day of an unpredictable campaign.

With the first round of voting in the two-stage election due to take place on Sunday, centrist Emmanuel Macron still held on to his position as frontrunner in the closely contested race.

An Elabe survey of voter intentions, carried out before the Thursday night shooting on the Champs Elysees shopping avenue in central Paris, showed Macron with 24 percent of the first-round vote and far right leader Marine Le Pen falling back slightly to 21.5 percent.

Two other candidates - former conservative prime minister Francois Fillon and the far left's Jean-Luc Melenchon - were snapping at their heels with 20 and 19.5 percent respectively.

Campaigning and the publication of voter surveys are banned from midnight on Friday until polling stations close. Sunday's round of voting will be followed by a second-round runoff on May 7 between the top two candidates.

The Champs Elysees attack was claimed by militant group Islamic State. One attacker was killed and officials said they were looking for a potential second suspect.

Emerging from an emergency meeting of security officials, Prime Minister Bernard Cazeneuve announced a full mobilisation of security forces, including elite units, to back up 50,000 police already earmarked to ensure citizens' safety during the election.

"The government is fully mobilised. Nothing must be allowed to impede the fundamental democratic process of our country," Cazeneuve told reporters. "It falls to us not to give in to fear and intimidation and manipulation which would play into the hands of the enemy."

The shooting abruptly pushed national security up the agenda, potentially making the outcome of Sunday's first round vote even more difficult to call. With their hardline view on security and immigration, the positions of Le Pen and Fillon may resonate more strongly for some voters.

But attacks that have taken place soon before elections, including the November 2015 attacks in Paris ahead of regional elections and the shooting in a Jewish school before the 2012 presidentials, have not appeared to change the course of those ballots.

An assault on a soldier in February at the Paris Louvre museum by a man wielding a machete also had no obvious impact on this year's opinion polls, which have consistently said that voters see unemployment and trustworthiness of politicians as bigger issues.

CROWDED CONTEST

Le Pen, who leads the National Front, has made immigration and security a core part of her campaign.

She wants to tighten French borders controls and build more jails, and says authorities are not doing enough to protect citizens from militant attacks, which have killed more than 230 people in France since January 2015.

"Today fundamentalist Islam is waging war and ... the measures are not being taken to limit the risks," she said on RFI radio.

Macron, who from 2014 to 2016 was economy minister in the Socialist government that Le Pen has criticised repeatedly for its security record, said the solutions were not as simple as she suggested.

"I've heard Madame Le Pen saying again recently that with her in charge, certain attacks would have been avoided," he said on RTL Radio. "There's no such thing as zero risk. Anyone who pretends (otherwise) is both irresponsible and deceitful."

In the Elabe poll, which was conducted on Wednesday and Thursday, both Fillon and Melenchon were seen narrowing Macron and Le Pen's lead over them.

Should Macron and Le Pen do make it to the second round, the former economy minister was projected to win the runoff - and thus the presidency - with 65 percent against 35 percent for Le Pen, the survey for BFM TV and L'Express magazine showed.

For the first round, Macron's projected 24 percent of the vote represented a steady score from the last time the poll was conducted three days earlier. Le Pen's 21.5 percent was a fall of 1.5 percentage points.

Fillon, who has slowly clawed back some ground lost after being hit by a fake jobs scandal, saw his score in the first round rise half a percentage point to 20 percent.

Melenchon, who would hike taxes on the rich and spend 100 billion euros ($107 billion) of borrowed money on vast housebuilding and renewable energy projects, gained 1.5 points to 19.5 percent as he built further on momentum he has seen after strong performances in television debates.

If Melenchon makes it to the runoff, he is projected to beat both Le Pen and Fillon by comfortable margins although he is seen losing to Macron 41 percent to 59 percent.

The number of people surveyed who expected to definitely turn out for the first round rose to 71 percent, the highest so far during the campaign although that is nonetheless low by historical standards.