PARIS — It has almost become routine in France: A terrorist attack shatters the rhythms of daily life, bringing bloodshed and anguish. The assailant turns out to be someone known to the authorities.

What is different now is the timing, as Paris is again on high alert, less than 36 hours before the country goes to the polls on Sunday in one of the most tumultuous and unpredictable presidential races in memory.

The brazen assault on Thursday by Karim Cheurfi, 39, a French national with a history of violence, left one police officer dead on the sidewalk of the Champs-Élysées.

It has also provided a potent opportunity for conservatives, primarily Marine Le Pen, leader of the far right National Front, to use the violence to try to stoke hostility toward immigrants and Muslims, as well as fears about whether citizens can be protected from terrorism.