Here is what we know so far.
The disaster was preceded by a large fire at the Port of Beirut, on the city’s northern Mediterranean coast. In videos posted on social media white smoke could be seen billowing from Warehouse 12, next to the port’s huge grain silos.
Shortly after 18:00 (15:00 GMT), the roof of the warehouse caught alight and there was a large initial explosion, followed by a series of smaller blasts that some witnesses said sounded like fireworks going off.
About 30 seconds later, there was a colossal explosion that sent a mushroom cloud into the air and a supersonic blastwave radiating through the city.
That blastwave levelled buildings near the port and caused extensive damage over much of the rest of the capital, which is home to two million people. Hospitals were quickly overwhelmed.
“What we are witnessing is a huge catastrophe,” said the head of the Lebanese Red Cross, George Kettani. “There are victims and casualties everywhere.”
Beirut Governor Marwan Abboud said as many as 300,000 people had been made temporarily homeless and that collective losses might reach $10-15bn (£8-11bn).
Lebanon’s Prime Minister, Hassan Diab, blamed the detonation on 2,750 tonnes of ammonium nitrate that he said had been stored unsafely at a warehouse in the port.
A similar amount of the chemical arrived on a Moldovan-flagged cargo ship, the MV Rhosus, which docked in Beirut in 2013 after suffering technical problems while sailing from Georgia to Mozambique.
The Rhosus was inspected, banned from leaving and was shortly afterwards abandoned by its owners, according to Shiparrested.com. Its cargo was reportedly transferred to Warehouse 12 following a court order, and should have been disposed of or resold.
Ammonium nitrate is a crystal-like white solid commonly used as a source of nitrogen for agricultural fertiliser. But it can also be combined with fuel oils to create an explosive used in the mining and construction industries. Militants have made bombs with it in the past.
Experts say that ammonium nitrate is relatively safe when stored properly. However, if you have a large amount of material lying around for a long time it begins to decay.
“The real problem is that over time it will absorb little bits of moisture and it eventually turns into an enormous rock,” Andrea Sella, professor of chemistry at University College London, told the BBC. This makes it more dangerous because if a fire reaches it, the chemical reaction will be much more intense.
Ammonium nitrate has been associated with deadly industrial accidents. In 1947, a ship carrying 2,000 tonnes of the chemical exploded in Texas, killing 581 people.
A fire appears to have triggered the explosion of the ammonium nitrate in Beirut.
Lebanese broadcaster LBCI and Reuters news agency cited sources as saying the fire was started by welding work being carried out on a hole in Warehouse 12.
The port’s general manager, Hassan Koraytem, confirmed that maintenance was conducted on the door of the warehouse before the explosion.
“We were asked to fix a door of the warehouse by State Security and we did that at noon, but what occurred in the afternoon I have no idea,” CNN quoted him as telling OTV.
Who were the victims?
More than 200 people were killed, including at the port and further afield.
Among the dead who have been identified was Jean-Marc Bonfils, a Beirut-born French architect. Mr Bonfils, who was involved in restoring buildings damaged in the city during the civil war, was broadcasting video of the incident live on Facebook after the first explosion but was injured in the second and later died. French Culture Minister Roselyne Bachelot said that France and Lebanon were united in grief at his death.
Firefighter Sahar Fares was a first responder at the scene of the blast. Her fiance Gilbert Qaraan mourned her in a post on Instagram, saying his heart burned with the loss. A photo posted on social media showed Sahar and seven male colleagues, all of whom are said to have died.
They were not the only emergency workers to lose their lives during the explosion. According to a list of confirmed casualties released by the Ministry of Health, at least five nurses also died.
German Foreign Minister Heiko Maas said a female diplomat from the German embassy had died in her apartment.
There are also reports of one American and two Egyptians killed in the blast, while a two-year-old boy from Australia has been confirmed dead.
The Lebanon-based cruise ship agency Abou Merhi said two people died and seven were injured when its Orient Queen ship was severely damaged by the blast.
The governor of Beirut has said that dozens of people were still missing, including many foreign workers.
Who is to blame?
President Aoun promised a transparent investigation into the blast and at least 20 people have been arrested so far.
Prime Minister Diab described the circumstances that led to the explosion as “unacceptable”.
Mr Koraytem and the director general of Lebanese Customs, Badri Daher, said their warnings about the danger posed by the stored ammonium nitrate and calls for it to be removed were repeatedly ignored.
“We requested that it be re-exported but that did not happen. We leave it to the experts and those concerned to determine why,” Mr Daher told broadcaster LBCI.
Documents circulated online appeared to show that customs officials sent letters to the judiciary seeking guidance at least six times from 2014 to 2017.
However, investigative journalist Riyad Qobaissi says these letters did not follow the right procedures and that customs officials simply kept resending the same letters in response to the judge’s request for more information.
The government has ordered officials at the port who oversaw the storage of the ammonium nitrate to be put under house arrest pending the completion of the investigation.
Lebanon’s minister of public works, meanwhile, told Al Jazeera that he found out about the presence of ammonium nitrate in July and spoke to the port’s general manager just two days before the explosion.
“No minister knows what’s in the hangars or containers, and it’s not my job to know,” Michael Najjar, who has been in his post for six months, told the channel.
However, President Aoun has so far rejected the possibility of any international investigation and has suggested that “external interference through a rocket or bomb or other act” could also have led to the blast.
Many Lebanese have been unimpressed by the government’s promises of transparency and accountability, and there have been clashes between protesters and police over the official response to the explosion.
They see the investigation as an attempt by a political elite accused of corruption, neglect and mismanagement to dodge blame for the disaster.