Fidel Castro once said more people know about Napoleon Bonaparte because of the brandy named after him than because of Austerlitz, the French emperor’s most famous battlefield victory. On the 200th anniversary of his death, Napoleon’s legacy lives on in ways more lasting than Castro gave him credit for.

Two weeks ago, 20 retired French generals called on the armed forces to save the nation from what they termed the dangers of radical Islam and civil war. Their appeal received enthusiastic backing from Marine Le Pen, the far-right politician.

From a historical viewpoint, this incident served as a reminder of the rich tradition of military interventions in French politics. It began with Napoleon’s coup d’état of 1799. It continued with his nephew Napoleon III’s coup in 1851, Boulangism in the 1880s, Philippe Pétain’s Vichy regime of the 1940s and the army revolts of 1958 and 1961.

A military coup is an outlandish idea in modern France. But among sections of the population the impulse to find a larger-than-life saviour, capable of transcending France’s divisions and revitalising the national spirit, has persisted since Napoleon’s days.

Charles de Gaulle embodied this impulse. For some of his supporters, so did President Emmanuel Macron when he defeated France’s traditional political parties in 2017 and became the nation’s youngest head of state since Napoleon. Le Pen, who will challenge Macron for the presidency next year, fills the same role for the far right.

Yet, just as Napoleon was rarely a unifying figure in life, so his legacy divides the French today. Opinion surveys rate him consistently as one of France’s greatest two or three historical figures. But Jacques Chirac, who loathed him, shunned the 2005 Austerlitz bicentenary of commemorations as president. Alexis Corbière, a leftist politician, says France should not mark the bicentenary of his death because “it is not for the republic to celebrate its gravedigger”.

Arguments about Napoleon serve as a proxy for the culture wars that grip France. Élisabeth Moreno, minister for gender equality and diversity in Macron’s government, condemned him as “one of the greatest misogynists”.

Moreno probably had in mind Napoleon’s 1804 civil code, which specified that wives owed obedience to husbands. Or she might have been thinking of Germaine de Staël, the 19th-century author who once asked Napoleon to describe the best kind of woman. He replied: “She who has the most children.”

Overall, de Staël was not impressed with Napoleon. Comparing him with the austere Jacobin who led the 1793-1794 Terror, she derided him as “Robespierre on horseback”.

More recently, campaigners for racial justice have seized on Napoleon’s decree of 1802, which aimed to reintroduce slavery in France’s colonies after its partial abolition eight years earlier.

Admirers of Napoleon prefer to see in him the administrative reformer who created the national central bank, the lycée school system and the prefects who oversee the départements. In this sense, he laid the foundations of the centralised, technocratic state that defines France to this day.

Critics emphasise the darker side of Napoleonic rule. This included police repression, manipulated plebiscites and endless wars of conquest that soured, leaving France’s national territory smaller by 1815 than it was before he seized power.

In parts of continental Europe, Africa and Latin America, Napoleon has served as an inspiration for national liberation movements. But in Russia and Spain he is remembered as an invader, and for Britons he encapsulates the danger of a tyrant controlling Europe. Two hundred years on, the Napoleonic legend is alive, well and contested.