NICE, France — The gruesome Bastille Day massacre along this Riviera city’s seaside boulevard was the third major attack in France since January 2015, a disconcerting reality that prompted France’s prime minister to admit that the country “had to learn to live with terrorism.”

But the series of assaults and the repeated states of high alert over the past 19 months have left France’s overlapping and often competing police forces stretched thin and close to exhaustion.

“It’s not possible to be mobilized this way all the time,” Frédéric Lagache, the deputy general secretary of the Alliance Police Union, a union of national police officers, said in an interview.”Our colleagues are tired, mentally and physically.”

This has been a heavy summer season of high-risk events, including the Tour de France bicycle race and the Euro 2016 soccer tournament, which the Islamic State had explicitly threatened. Police have also had to deal with occasionally violent protests against a controversial labor law.

“The French security forces are exhausted,” Lagache said. “Concerning Nice, it has to be said that we can’t ensure a level of security of 100 percent.”

Onlookers jeered as national officials appeared in Nice on Monday, with some in the crowd even calling for the resignation of the prime minister, Manuel Valls.

Nationwide, 67 percent expressed little confidence in the current government’s capacity to fight terrorism, according to the results of a poll conducted by the IFOP agency and the Figaro newspaper.

French President François Hollande is the country’s least popular head of state on record, with approval ratings that have been consistently below 20 percent for months. A significant element in his government’s unpopularity is its perceived impotence in stopping terrorist attacks.

In essence, few in France are willing to accept the inevitability of nightmarish scenes like that on the night of July 14 in Nice, when a 31-year-old local man plowed a 19-ton truck through celebrating crowds on the famed Promande des Anglais, killing 84 people and injuring hundreds more.

After the January 2015 assault on the offices of the satirical newspaper Charlie Hebdo and the November 2015 attacks by Islamic State-affiliated militants on a stadium, concert hall and series of cafes across Paris, the Nice attack has thrust the question of national security to the center of public debate with a renewed sense of urgency.