Notre-Dame fire: Eight centuries of turbulent history
The grief caused by the near-destruction of Notre-Dame may seem puzzling for a country as resistant to religion as France.
But the mass devotion the cathedral attracts is not a spiritual one. It is rooted in the building's location at the heart of the nation's intellectual life.
Notre-Dame dominates the Latin Quarter - named after the language spoken by the scholars and students that flocked there in medieval times. Just down the river are the Louvre, a royal palace turned into the world's largest museum, and the grand building of the Institut de France, the country's foremost learned society.
Since the 16th Century bibliophiles have wandered among the bookstalls that line the banks of the Seine in the cathedral's shadow.
The English-language bookstore Shakespeare and Company lies across the Petit Pont to the south. This is where Ezra Pound, Ernest Hemingway, James Joyce and other giants of world literature have come to imbibe French culture, along with more liquid delights in the many cafés nearby.
Notre-Dame seems to have grown naturally from its surroundings. Its soaring towers provide a focus of attention in a city that fancies itself as the capital of high culture; the eminent British art historian Kenneth Clark once called it "the most rigorously intellectual facade in the whole of Gothic art".
The cathedral is linked with Paris' emergence as a centre of learning. The Gothic building - built over a century from the 1160s - replaced a Romanesque structure that was home to the "École cathédrale".
France's first celebrity philosopher, Pierre Abélard, had taught logic and theology there in the early 12th Century, attracting admirers from all over Europe.
The new church maintained this legacy of scholarship. In due course the "École cathédrale" morphed into the University of Paris, the Sorbonne and its offshoots, which all still stand a few minutes' walk away.
The history of Notre-Dame, however, is more turbulent than its current, majestic appearance suggests.
Notre-Dame before the fire in 360° video
The cathedral played a role in the Hundred Years' War: in 1431, King Henry VI of England was crowned there as King of France to assert English claims to the throne across the Channel.
From the 16th Century, Notre-Dame fell victim to France's political and religious strife, as well as changing cultural tastes.
Renaissance men sought to break away from the medieval period and rediscover the cultural treasures of ancient Greece and Rome. Gothic was out. Classical was in. Internal pillars and walls were covered with tapestries, as if its custodians were ashamed of them.
France's fierce wars of religion took their toll on the cathedral. In 1548 Huguenot Protestants attacked statues which they regarded as sacrilegious.
In 1572 the future Henri IV, a Huguenot who sought to end the bloodshed, married Marguerite de Valois, a princess from the ruling Catholic dynasty. The wedding was celebrated in front of Notre-Dame - although Henri did not go so far as to enter the building.
But the symbolic reconciliation on the cathedral's doorstep did not last long. Within days thousands of Protestants who had come to Paris to attend the wedding were slaughtered by Catholics in the infamous St Bartholomew's Day massacre.
The Enlightenment was not kind to Notre-Dame either. In the 18th Century, it was more out of step with the prevailing intellectual mood than at any other time in its history.
A masterpiece of Gothic art held no appeal to thinkers who equated the medieval period to the Dark Ages and were deeply suspicious of the Roman Catholic Church.
The clergy themselves did not seem to care much for the building. In the early 1750s, some felt the cathedral was too dark and decided to replace the stained glass window with clear glass to let in more light. A few years later sculptures above the main portal were knocked down to make it easier for processions to pass through.
By the 1780s, the 13th Century spire was beginning to look wobbly. The authorities fixed the problem by taking it down.
Things got even worse for the cathedral during the French Revolution. The Church, loathed by many as the ally of the Ancien Regime, was taken over by the state.
Church bells were removed across the country. In 1791, those of Notre-Dame were crushed and melted down. In 1793, the 28 statues of kings that stand above the front portals of Notre-Dame were decapitated by rioters.
Later that year religion was banned outright and the cathedral was converted into an atheist "Temple of Reason" dedicated to Enlightenment and Revolutionary ideals.
When it turned out that the worship of liberty, equality and fraternity did not fill pews, the cathedral was turned into a warehouse for storing food.
Notre-Dame was not returned to the Catholic Church until 1802, after Napoleon Bonaparte made peace with the Vatican.
It was spruced up in time for Napoleon to be crowned emperor there in 1804, with Pope Pius VII in attendance.
He chose the venue over the cathedral in Reims, where French kings were traditionally crowned, to indicate a clean break with the Old Regime. Paris, not Reims or Versailles, was the centre of his world and Notre-Dame was at the centre of it.
But imperial favour did not revive the fortunes of the cathedral. In the first two decades of the 19th Century many medieval buildings were regarded as antiquated eyesores.
Some were pulled down, others were submitted to botched-up restoration work. Notre-Dame itself did not seem safe from the wrecking ball.
But another swing of the cultural pendulum changed everything. The Romantic movement turned against grand, Roman-inspired architecture, and rediscovered the messy beauty of the Middle Ages. Classical was out. Gothic was in.
No-one did more to save Notre-Dame than Victor Hugo. In a 1825, the young writer published an angry tract "on the destruction of the monuments of France". "The hammer that mutilates the face of France must be stopped," he wrote.
But it was his hugely popular 1831 novel The Hunchback of Notre Dame - simply "Notre Dame de Paris" in French - that was most effective. By portraying the building as a character, Hugo literally brought it back to life.
A nationwide campaign led to a massive renovation project. The work, between 1844 and 1864, returned the cathedral to its former glory - and more.
Lead architect Eugène Viollet-le-Duc used traditional building methods to secure the buttresses and put up a new spire, the one destroyed by fire this week.
Sculptors repaired the beheaded sculptures. Glassmakers and other craftsmen restored the original decoration from drawing and engravings.
Where these were not available, Viollet-le-Duc and his artists used their imagination. Many of the medieval-looking gargoyles and monsters crawling all over the cathedral are their creations.
In the 1850s and 1860s Baron Haussmann carried out a vast urban renewal programme that made Paris the city of wide boulevards and distinctive stone buildings it is today.
The hospital and cluster of smaller buildings that had stood in front of Notre-Dame for centuries were cleared. They were replaced by a wide-open space - known as the "parvis" - creating a sense of distance and grandeur.
It the 20th Century Notre-Dame witnessed a succession of traumas - from two world wars to the 1968 unrest literally a cobblestone's throw away - but it escaped unscathed.
It also became a focus for historical ceremonies. This is not inconsistent with France's secular constitution - under the 1905 law on separation of Church and state, all cathedrals are property of the French government.
An official Mass was celebrated there to mark the end of World War One. Following the liberation of Paris from the Nazis in August 1944, General de Gaulle attended a similar service after marching with his troops down the Champs-Élysées.
As the general stepped out of his car, sustained gunfire rang out on the parvis, causing panic among the crowd. De Gaulle walked into the cathedral and took his seat without batting an eyelid. No-one knows to this day who fired the shots.
When de Gaulle died in 1970, a memorial service attended by heads of state from around the world was held at Notre-Dame. François Mitterrand, who died in 1996, was the only other former French president to be honoured in the same way.
But the best sign of Notre Dame's significance is not the odd official event, but the homage of 13 millions visitors every year - more than any other site in Western Europe.
Notre-Dame stands tall as a symbol of permanence. The fire shocked Parisians because it showed that such a fixture in their physical and cultural landscape was vulnerable. But the cathedral has also shown its power for renewal in difficult times.