PARIS -- A fire swept across the top of the Notre Dame Cathedral while the soaring Paris landmark was under renovations Monday, collapsing its spire and threatening one of the world's greatest architectural treasures as locals and tourists watched aghast from the streets.

The French president pledged to rebuild a cathedral that he called "a part of us" and appealed for help to do so. The 12th-century church is home to relics, stained glass and other incalculable works of art and is a leading tourist attraction, immortalized by Victor Hugo's 1831 novel "The Hunchback of Notre Dame."

The Paris prosecutor's office said it was treating the fire as an accident, ruling out arson and possible terror-related motives, at least for now. French media quoted the Paris fire brigade as saying the fire was "potentially linked" to a 6 million euro ($6.8 million) renovation project on the spire and its 500 tons of wood and 250 tons of lead.

Despite the dramatic image of the flaming cathedral, no one was killed. One firefighter was injured, among some 400 who battled the flames for hours before finally extinguishing them. Firefighters continued working through the night to cool the building and secure the monument, as residual sparks sprinkled down from the gaping hole where the spire used to be.

The blaze started at 6:50 p.m. after the cathedral had closed to the public, and spread to one of its landmark rectangular towers.

Nearby buildings were evacuated as fears mounted that the structure could collapse.

As the spire fell, the sky lit orange, acrid smoke rose in plumes and flames shot out the roof behind the nave. Hundreds of people lined bridges around the island that houses the church, one of the most visited tourist attractions in the world.

Paris fire chief Jean-Claude Gallet said the structure had been saved after firefighters managed to stop the fire spreading to the northern belfry. Gallet said "two-thirds of the roofing has been ravaged."

The fire came less than a week before Easter amid Holy Week commemorations. As the cathedral burned, Parisians gathered spontaneously to pray and sing hymns outside the church of Saint-Julien-Les-Pauvres across the river from Notre Dame while the flames lit the sky behind them. Paris Archbishop Michel Aupetit invited priests across France to ring church bells in a call for prayers.

Nearing midnight, signs pointed to the fire nearing an end as lights could be seen through the windows moving around the front of the cathedral, apparently investigators inspecting the scene.

The city's mayor, Anne Hidalgo, said a significant collection of art and holy objects inside the church had been recovered. In a tweet later, she thanked firefighters and others who formed a human chain to save artifacts. "The crown of thorns, the tunic of St. Louis and many other major artifacts are now in a safe place," she wrote.

Experts say firefighters were left with devastatingly few options to save a structure that's more than 850 years old, built with heavy timber construction and soaring open spaces, and lacking sophisticated fire-protection systems.

French President Emmanuel Macron treated the fire as a national emergency, rushing to the scene and cancelling a previously scheduled televised address meant to address France's yellow vest crisis.

"The worse has been avoided, although the battle is not yet totally won," the president said, adding that he would launch a national funding campaign on Tuesday and call on the world's "greatest talents" to help rebuild the monument.

"Notre Dame of Paris is our history, our literature, our imagination. The place where we survived epidemics, wars, liberation. It has been the epicenter of our lives," Macron said from the scene.

Built in the 12th and 13th centuries, Notre Dame is the most famous of the Gothic cathedrals of the Middle Ages. Situated on the Ile de la Cite, an island in the Seine river, its architecture is famous for, among other things, its many gargoyles and its iconic flying buttresses. Some 13 million people visit it every year.

Among the most celebrated artworks inside are its three stained-glass rose windows, placed high up on the west, north and south faces of the cathedral. Its priceless treasures also include a Catholic relic, the crown of thorns, which is only occasionally displayed, including on Fridays during Lent.

"It's not one relic, not one piece of glass -- it's the totality," said Barbara Drake Boehm, senior curator at the Metropolitan Museum of Art's medieval Cloisters branch in New York, her voice shaking as she tried to put into words what the cathedral meant. "It's the very soul of Paris, but it's not just for French people. For all humanity, it's one of the great monuments to the best of civilization."

Global reactions came swiftly including from the Vatican, which released a statement expressing shock and sadness for the "terrible fire that has devastated the Cathedral of Notre Dame, symbol of Christianity in France and in the world."

In Washington, : "So horrible to watch the massive fire at Notre Dame Cathedral in Paris" and suggested first responders use "flying water tankers" to put it out.

Cardinal Timothy Dolan, the archbishop of New York, "to ask the intercession of Notre Dame, our Lady, for the Cathedral at the heart of Paris, and of civilization, now in flames! God preserve this splendid house of prayer, and protect those battling the blaze."

------

Associated Press writers Sylvie Corbet and Danica Kirka contributed.

----