Explosions in Beirut last week left more than 170 people dead and more than 6,000 injured. Across Lebanon’s capital, people captured the stunning moment on video, creating a patchwork collage of footage documenting the disaster as it unfolded. Authorities attributed the blast to a stockpile of ammonium nitrate that sat in the city’s crowded port for years, despite warnings of danger. Protests calling for accountability erupted over the weekend.

On Monday, the country’s prime minister resigned.

Here’s what we know so far.

What happened?

On Aug. 4 around 6 p.m. local time, at least one initial explosion at a warehouse in the port area of Beirut ignited a fire, apparently triggering a second, far stronger blast that sent a shock wave across the city.

A mushroom cloud of red-tinged smoke, visible from afar, billowed above the site of blasts.

The impact could be felt more than 100 miles away in the Mediterranean, but it was strongest in the popular Beirut neighborhoods near the port, lined with apartments, clubs and restaurants. The area was devastated by the explosions, with many buildings flattened.

The blast caused damage miles away, including at Beirut’s airport, south of downtown. Several foreign diplomatic missions, including the Norwegian and German embassies, were also affected.

The stream of injured strained the capacity of hospitals, according to the Lebanese Red Cross.

In the aftermath of the explosions, concerns also emerged over the release of potential toxins into the air.

What caused the explosions?

The exact cause of the blasts remains to be determined definitively.

Mohammed Fahmi, the Lebanese interior minister, said the devastation was probably caused by the explosion of a stockpile of ammonium nitrate. Via a spokesman, Lebanese Prime Minister Hassan Diab said several thousand tons of the chemical had improperly been stored for the past six years.

“It is unacceptable and we cannot remain silent on this issue,” he said.

While many signs point to negligence as the main culprit, Lebanese President Michel Aoun said investigators were also looking at the possible role of “external interference” in the chain of events that triggered the explosions, according to MTV, a Lebanese broadcaster.

Arms experts said the explosions were consistent with the key characteristics of ammonium nitrate detonations.

According to legal documents, court correspondence and statements by public officials obtained by The Washington Post, a cargo ship flying the flag of Moldova was carrying the approximately 2,750 metric tons of ammonium nitrate when it made an unscheduled stop in Beirut in 2013 on its way to Mozambique from Georgia.

Given the risky nature of the material on board, court documents said, port authorities put the cargo into port warehouses to await “auctioning and/or proper disposal.” But the cargo just sat there, despite attempts from several officials to seek guidance on what to do with the volatile material.

President Trump said last week the blasts were a “terrible attack,” but no evidence has yet emerged that the explosions were set off on purpose.

U.S. military officials said they were still examining the incident.

The leader of Lebanon’s powerful Hezbollah warned against blaming the Shiite militia, rejecting allegations that Hezbollah exerted control over the site.

What is ammonium nitrate?

The chemical compound is a white salt and an oxidizer — it fuels fires by supplying oxygen. Without a detonator, pure ammonium nitrate does not explode, which is why it is considered safe to use as an agricultural fertilizer.

But storage of ammonium nitrate with organic materials — especially liquids that can leak and readily mix, such as vegetable or fuel oil — poses serious risks, said Marc-Michael Blum, who headed the Organization for the Prohibition of Chemical Weapons laboratory until last year.

“In the presence of heat, such a mixture can easily lead to catastrophic outcomes,” said Roger W. Read, an honorary associate professor at the University of New South Wales School of Chemistry, according to the Science Media Center.

Lt. Michel el Murr, the head of search and rescue for the Lebanese fire crew at the Beirut port, said paint thinner and other material stored nearby may have caught fire and ignited the ammonium nitrate blast.

How has the Lebanese government responded?

In the days after the blasts, people began to clear the rubble and searched for bodies. Many such efforts were led by ordinary people, not the government. Protesters took to the streets, decrying the negligence that led to the explosions and demanding accountability. Authorities met them with tear gas.

Diab, the Lebanese prime minister, said Monday he would resign amid the unrest. He said the levels of corruption that facilitated the blasts extended beyond his government. The office of Aoun, Lebanon’s president, said Diab’s cabinet would stay on until a new ruling coalition could be formed.

Aoun has rejected calls for an international inquiry into the disaster, saying it would only slow down the process.

Decades of corruption and mismanagement already left Lebanon in the throes of economic calamity, with the value of the currency shattering and hundreds of thousands of Lebanese sinking below or close to the poverty line in a matter of weeks. Right groups have long decried endemic corruption in the country, tied to a range of ill, from air pollution to the downward economic spiral. Diab’s resignation did not quiet unrest in the streets.

How have other countries responded?

After the blasts, many countries issued statements of support for Lebanon and pledged to help the country recover.

“The pandemic already meant that hospitals are overwhelmed, and front-line workers are exhausted,” Yukie Mokuo, the Lebanon representative for UNICEF, the United Nations’ children’s agency, said in a statement last week.

French President Emmanuel Macron became the first world leader to visit the country, a former French protectorate, last week. He called for the investigation to be co-led by international experts.

France has also sent medical aid, and several countries, including Germany, sent rescue or evidence recovery teams.

According to the U.S. Embassy in Lebanon, the United States has pledged over $17 million in aid. Russia pledged to send five planes full of medical aid and personnel, along with novel coronavirus tests.

Planes from Kuwait landed in the Lebanese capital on Wednesday. Qatar, Jordan and Iran also offered to send medical aid and field hospitals to the site.

Neighboring Israel offered emergency assistance as well — through international intermediaries because the two countries are technically at war.

How might the explosions affect life in Lebanon?

Lebanon descended into a severe economic crisis over the past year. As banks limited the distribution of dollars, the official currency spiraled into free fall and bailout talks with the International Monetary Fund stalled. Many Lebanese have blamed the country’s political elite — widely seen as corrupt and mired in rampant corruption — for the economic collapse. Major protests erupted late last year and have resumed in recent months.

These conditions could amplify the effect of the blasts, which many Beirut residents are blaming on the government.

The explosions hit amid the additional burden of rising novel coronavirus cases. Lebanon has officially confirmed more than 5,000 coronavirus infections and 70 deaths, with more than 300 new cases reported Wednesday.

After months of requests to stay home amid the pandemic, many people now find themselves homeless, forced to seek shelter among friends or relatives.

The mayor of Beirut, Marwan Abboud, said last week that up to 300,000 people may have been left temporarily without a place to live. Schools are expected to open as shelters for homeless residents.

Repairs could cost $5 billion. Three Beirut hospitals are largely out of commission due to the explosions, the World Health Organization said. Out of 55 health-care centers in the city, “just over 50 percent are nonfunctional,” according to a WHO official.

The explosions could also threaten Lebanon’s food and medical supply, as storage warehouses and port docks — which processed over 80 percent of the country’s grain imports — were destroyed. On Monday, U.N. food assistance chief David Beasley said he was “very, very concerned” about the situation and warned that the country could run out of bread within 2½ weeks.

Has anything like this happened before?

A dockside warehouse near a densely populated area. A stockpile of ammonium nitrate, stored under dubious conditions. A blast that tore parts of a city apart. Angry demands for accountability. Videos uploaded to social media that stunned viewers around the world.

Although the exact cause of the Beirut blasts remains to be determined, they bear an undeniable resemblance to explosions that flattened parts of Tianjin, a Chinese port city, in 2015, killing over 170 people and injuring hundreds more.

The United States once experienced a major accidental ammonium nitrate blast. In 1947, a stockpile of the chemical exploded in the port of Texas City, Tex., triggering a 15-foot-high wave and leaving hundreds of people dead. At the time, the blast was attributed to 2,300 tons of the chemical.

This story has been updated.

Noack reported from Berlin and Mellen reported from Washington. Miriam Berger in Washington, Liz Sly and Sarah Dadouch in Beirut, and Louisa Loveluck in Baghdad contributed to this report.