France mourns - yet again - appalled by a terror attack that, so far, bears the hallmark of the so-called "Islamic State" (IS). The attack took place late Thursday evening. It began when a man driving his car along Paris' famous Champs-Elysee boulevard stopped and got out, brandishing an automatic assault rifle. He then opened fire on a police cruiser, killing one officer and injuring two more. A German pedestrian was also injured when a bullet struck her in the foot. Panic ensued.

French security authorities had been intent on keeping this kind of situation from happening in the run-up to Sunday's presidential election. No one, they said, should have to be scared about casting their vote. "It was clear that the self-proclaimed 'Islamic State' would try to destabilize the country during the election," says Sebastian Roche, a security expert at the Sciences Po Institute of Political Studies at the University of Grenoble. "Authorities were counting on it."

On high alert

Melenchon: We must 'avoid polemic bickering'

Even before the Champs-Elysee attack, it was clear that security would be heightened on Sunday: more than 50,000 police officers and another 7,000 soldiers from a special army anti-terror unit will be deployed around the country when citizens head to the polls. France also remains under a state of emergency. After the November 13, 2015, Paris terror attacks, security authorities were granted special powers - allowing them to do things like apprehend suspects in their homes and close public squares without the need for judicial permission.

As the week began, it looked as if France's security forces were in good shape. Police in Marseille, for instance, were able to arrest two men suspected of planning a terror attack. Later, authorities discovered explosives, weapons and "IS" flags while conducting an apartment search. President Francois Hollande called the operation a remarkable success, and the French press even praised the police for their good work.

"On one hand it's clear that police can stop terror attacks," says Sebastian Roche. "On the other hand it is impossible to completely prevent terrorism. There are thousands of potential targets - schools, bars, airports - they cannot all be protected." Moreover, the security expert points out one particular dilemma in fighting terror: "The police and the army have become targets themselves. The more police you put on the street, the more terror targets there are." Security forces have already been the victims of terror attacks three times this year: In February a man attacked two soldiers in front of the Louvre museum; in March another perpetrator attacked a soldier at Orly airport, attempting to wrestle her assault rifle from her while holding a handgun to her head; and now the Champs-Elysee incident.

Macron leads in the polls

Attacks throughout Europe over the last several years prove that no matter how determined countries are about fighting terror, there will always be a spark of uncertainty. Terrorism can never be completely controlled.

'Don't panic'

Nevertheless, France's presidential candidates have all been trying to show resolve in the final days of the campaign. As the attacker on the Champs-Elysee was firing his gun, all 11 presidential candidates were in the middle of their last televised debate. When news of the attack reached the "France 2" studios, the candidates initially expressed their condolences to police. Then far-left candidate Jean-Luc Melenchon, speaking of Sunday's first round of voting, said: "Don't panic. We must not interrupt our democratic process. It is our responsibility to avoid polemic bickering."

Yet suddenly, the topic of terrorism overshadowed all other subjects. All of the candidates sought to use the final hours of the campaign, which officially ends at midnight on Friday, to present themselves as the best choice for the country's highest office. Republican Francois Fillon once again called for more drastic measures to deal with "known threats" and "radical preachers." And far-right candidate Marine Le Pen of the National Front repeated her well-known mantra that France must withdraw from the Schengen Area, close its borders and stop "uncontrolled immigration."

Le Pen has taken an anti-immigrant stance

Le Pen has been lagging a bit in recent opinion surveys. The latest election predictions by polling research institutes put centrist Emmanuel Macron ahead with 24 percent of the vote; followed by Le Pen, who is hovering around 21 or 22 percent. Close behind are conservative Fillon at 20 percent, and far-left Jean-Luc Melenchon at 19 percent. The two candidates that win the most votes on Sunday will face each other in a run-off election on May 7.

Who gains from terrorism?

Will the attack on police shake up Sunday's vote? Evelyne Gebhardt, a vice-president at the European Parliament, voiced just such fears in a radio interview on Friday. The Social Democratic MEP said that the attack will likely benefit Le Pen more than any other candidate. But she added that the border closing and isolationism the far-right populist is calling for won't do anything to help. Gebhardt reminded listeners that very few of the perpetrators of terror attacks in France had come from abroad.

Will Fillon's experience put him on top?

Pierre Vimont, a senior fellow and France expert at "Carnegie Europe," a Brussels think tank, also believes the attack could swing the election toward the candidate who "appears most capable of confronting the threat of terrorism." He predicts that candidate will likely be Fillon. The Republican, says Vimont, "has the most experience, and seems as if he could be presidential." What does all of this mean for 39-year-old Macron? "People might perceive him as being too young, and perhaps knowing too little about leading a government."

Either way, the French will not let anyone keep them from voting on Sunday, says security expert Roche: "The people want to vote. They don't want to show any fear. That would mean the terrorists had won."