PARIS — For at least the last three French elections, voters in the town of Louviers, about 60 miles northwest of Paris, have cast ballots for the candidate who ultimately won the presidency. So who are they voting for on Sunday, in the country’s closest race in memory?

“I haven’t decided. It’s gnawing at me,” said Charlène Hedoux, 30, a cleaning woman who was sitting at a bus stop this past week in central Louviers, which has a soaring Gothic church and bustling cafes. “I have children. I didn’t before. When one sees how these last few days have been going, it’s not very reassuring.”

And that was before the terrorist attack on Thursday that left a police officer dead in central Paris and added yet another combustible element to an already volatile race.

The election on Sunday is one of the most consequential in recent times — not just for France, but for Europe — and one of the most unpredictable.