PARIS — He was the savior of Europe. A 39-year-old maverick who rescued France from the populist tide, the newcomer who crushed his far-right opponent Marine Le Pen in a TV debate on the eve of a presidential election. The leader who would make liberal democracy great again. The visionary who had a plan to jump start the European Union. A 21st-century John Kennedy. Some joked that he could walk on water.

That was 2017. Eighteen months into his presidential term, Emmanuel Macron, faced with an uprising by a leaderless army of working poor in yellow vests and by violence unseen since the student riots of May 1968, is struggling to take back control of his country. The charismatic young president was jeered by protesters who tried to chase his car this week when he visited a public building set afire by rioters in Le Puy-en-Velay, in south-central France. “Macron, démission” — “Macron, resign” — has become the rallying cry of these modern-day sans-culottes, whose anger is directed at him, personally.

In a rare show of humility, Mr. Macron admitted a month ago that he had “failed to reconcile the people with its leaders.” Little did he suspect that the anger would turn into hatred, of the kind thrown in the face of dictators by the Arab Spring. As a fourth Saturday of protests looms, in spite of an olive branch offered by the government, nobody can predict whether this revolt will eventually give way to dialogue or degenerate into an even more profound and dangerous crisis.

What went wrong? Two sets of factors have come into play. One is not specific to France: an insurrectional wave that is now a familiar feature of Western democracies shaken by the disruptions of globalization, the aftermath of the 2008 economic crisis and the inability of our traditional political parties to adjust to these new challenges. Brexit, Donald Trump’s election, an emergence of the far right in Germany and a victory of anti-system parties in Italy — all, though less violent, are part of the same dynamics. Emmanuel Macron was initially seen as a bulwark against this trend. More determined than his predecessors, he would reform France with a progressive agenda that would do away with the injustices of the old world.