PARIS — The massive fire at Notre Dame Cathedral in Paris was extinguished early Tuesday after a nine-hour battle, authorities said.

"The cathedral’s structure has been saved and the main works of art are safe," the French city's fire service said in a tweet.

The blaze caused the historic building's roof to collapse, destroyed a spire and spread to one of its two rectangular towers. The sight brought many onlookers to tears.

No one was killed, but two police officers and a firefighter were injured.

The fire started at 6:50 p.m. after the landmark had closed to the public. Around 400 firefighters worked 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.

French President Emmanuel Macron said the country's citizens must push through their sadness.

"With pride I tell you tonight that we will rebuild this cathedral, all together," Macron added. "It's part of the fate, the destiny of France, and our common project over the coming years. And I am committed to it."

Macron said a national fundraising campaign to restore Notre Dame would be launched Tuesday, and he called on the world's "greatest talents" to help.

Pledges from French businessmen immediately started rolling in. Billionaire Bernard Arnault's family and his LVMH luxury goods group — which is behind Louis Vuitton — said that they would donate €200 million ($226 million). And Francois Henri Pinault, the head of Kering — which owns brands including Gucci and Yves Saint Laurent — vowed to donate €100 million ($113 million).

Paris City Hall said it would contribute €50 million ($56 million) to the project.

A team of 50 investigators has been mobilized to determine the cause of the "accidental" blaze, Paris prosecutors said at a press conference on Tuesday. They have started questioning witnesses and 15 construction workers who were at the site on Monday.

But forensic police are still waiting for the go ahead to enter the cathedral, after the fire destabilized the building's structure.

Flames could be seen near scaffolding — high at the top of the famous church where $6.8 million in renovations were being completed — and billowing smoke was visible from miles away in the French capital.

Download the NBC News app for breaking news and updates on the Notre Dame fire.

"I'm devastated," said Elizabeth Caille, 58, who lives nearby. "It's a symbol of Paris. It's a symbol of Christianity. It's a whole world that is collapsing."

Paris Mayor Anne Hidalgo said that many of the precious artifacts inside the cathedral, including a relic believed to be worn by Jesus Christ which was stored in the collapsed spire, had been saved.

"The crown of thorns, the tunic of Saint Louis and several other major works are now in a safe place," Hidalgo said in French on Twitter.

Smoke billows inside Notre Dame Cathedral in Paris on Monday. Philippe Wojazer / Pool via AP

A spokesman for City Hall told NBC News Tuesday that the some of the cathedral's famed rose windows and main organ were in good condition, and the site's "most precious treasures" had been moved to a secret location.

Culture Minister Franck Riester posted photos of French authorities loading art and other relics into a truck social media.

"They are gradually being put into safety," Riester said.

The massive blaze also spread to one of the church's rectangular towers. Flames could be seen blazing behind an oblong stained-glass window in one of the towers.

God bless the people of France! — Donald J. Trump (@realDonaldTrump) April 15, 2019

My heart goes out to Paris. Notre Dame is a symbol of our ability as human beings to unite for a higher purpose—to build breathtaking spaces for worship that no one person could have built on their own. I wish France strength and shared purpose as they grieve and rebuild. — Hillary Clinton (@HillaryClinton) April 15, 2019

The majesty of Notre Dame—the history, artistry, and spirituality—took our breath away, lifting us to a higher understanding of who we are and who we can be. Being here in Paris tonight, my heart aches with the people of France. Yet I know that Notre Dame will soon awe us again. https://t.co/p1mIDMbwe1 — Michelle Obama (@MichelleObama) April 15, 2019

Witness Nicholas Marang was jogging by the Seine River when he spotted smoke — but didn't immediately realize Notre Dame was on fire. He whipped out his phone and took footage of the spire's fall.

"I ran to the cathedral and saw the spire of the cathedral falling," Marang, a 47-year-old consultant, told NBC News. "Something just collapsed inside me. One of the worst things I've ever seen."

French historian Camille Pascal told broadcaster BFM that the fire marked "the destruction of invaluable heritage."

"It's been 800 years that the cathedral watches over Paris," Pascal said. "Happy and unfortunate events for centuries have been marked by the bells of Notre Dame."

Cardinal Timothy Dolan, the archbishop of New York, said he was praying that "God preserve this splendid house of prayer, and protect those battling the blaze."

Glenn Corbett, an associate professor of fire science at John Jay College in New York, said there is a history of churches, synagogues and temples going up in flames during renovations — as workers use equipment that could act as sources of ignition.

"If there is a most vulnerable time for a church, it is when it is under construction because we get people who are using torches or welding," Corbett added.

The house of worship, with roots dating back to the 12th century, is considered one of the world's greatest examples of French Gothic architecture.

Construction of Notre Dame began in 1163 under the reign of King Louis VII, and the first stone was laid in the presence of Pope Alexander III.

The landmark was not considered complete until nearly 200 years later, however, with the installation of flying buttresses and a stone fence surrounding the choir and the sanctuary, according to the website for Notre Dame de Paris.

The Associated Press reported that $19 million was set aside in 1991 for a restoration project to replace loose stones on the cathedral.

Nine bronze bells were made in 2013, the church’s 850th anniversary, in order to replace deteriorating artifacts.

Sixteen copper statues were removed from the spire on Friday as part of a restoration effort that was estimated to cost more than $900,000, Agence France Presse reported.

Margot Haddad reported from Paris, David K. Li and Doha Madani from New York, and Rachel Elbaum from London.