A number of Beirut port officials are being placed under house arrest pending an investigation into Tuesday's huge explosion, Lebanon's government says.
The blast killed at least 135 people and injured more than 4,000 others. A two-week state of emergency has begun.
President Michel Aoun said the blast was caused by 2,750 tonnes of ammonium nitrate stored unsafely in a warehouse.
Customs chief Badri Daher said his agency called for the chemical to be removed, but "this did not happen".
"We leave it to the experts to determine the reasons," he said.
Ammonium nitrate is used as a fertiliser in agriculture and as an explosive.
Opening an emergency cabinet meeting on Wednesday, President Aoun said: "No words can describe the horror that has hit Beirut last night, turning it into a disaster-stricken city".
Specialists at the University of Sheffield in the UK estimate that the blast had about one tenth of the explosive power of the atomic bomb dropped on the Japanese city of Hiroshima during World War Two and was "unquestionably one of the biggest non-nuclear explosions in history".
What triggered the explosion?
The ammonium nitrate had reportedly been in a warehouse in Beirut port for six years after it was unloaded from a ship impounded in 2013.
The head of Beirut port and the head of the customs authority both told local media that they had written to the judiciary several times asking that the chemical be exported or sold on to ensure port safety.
Port General Manager Hassan Koraytem told OTV that they had been aware that the material was dangerous when a court first ordered it stored in the warehouse, "but not to this degree".
Lebanon's Supreme Defence Council has vowed that those found responsible will face the "maximum punishment" possible.
Economy Minister Raoul Nehme told the BBC: "I think it is incompetence and really bad management and there are a lot of responsibilities from management and probably previous governments. We do not intend after such an explosion to stay silent on who is responsible for what."
House arrest would apply for all port officials "who have handled the affairs of storing [the] ammonium nitrate, guarding it and handling its paperwork" since June 2014, Information Minister Manal Abdel Samad said.
The ammonium nitrate arrived on a Moldovan-flagged ship, the Rhosus, which entered Beirut port after suffering technical problems during its voyage from Georgia to Mozambique, according to Shiparrested.com, which deals with shipping-related legal cases.
The Rhosus was inspected, banned from leaving and was shortly afterwards abandoned by its owners, sparking several legal claims. Its cargo was stored in a port warehouse for safety reasons, the report said.
Another attempt to dodge the blame?
By Sebastian Usher, BBC Arab Affairs Editor
Volunteers have poured onto the streets of Beirut to help clear up the devastation while others have been visiting the worst affected areas in a state of shock.
The government has been promising a full and transparent investigation and told the military to put those responsible for storing the vast quantity of ammonium nitrate under house arrest.
But Beirutis have been unimpressed, seeing it as another attempt by the political elite to dodge the blame for disaster.
Instead, they are demanding full accountability. Many on social media have welcomed the generosity of those offering help from around the world, but have asked people to avoid making any donations through the government, which they now regard as terminally corrupt and incompetent.
More on the explosion in Beirut
What is the latest on rescue efforts?
Security forces have sealed off a wide area around the blast site, and rescuers have been looking for bodies and survivors under rubble while boats searched the waters off the coast. Tens of people are still missing.
Public Health Minister Hamad Hassan said Lebanon's health sector was short of beds and lacked the equipment necessary to treat the injured and care for patients in critical condition.
He said a "large number of children" had been rescued but added that he feared that the number of dead would rise further.
The Saint Georges hospital near the site of the explosion was badly damaged and several members of staff were killed. Three Beirut hospitals were closed with two others only partially operational, the World Health Organization (WHO) said. The body said it would airlift medical supplies to Lebanon on Wednesday evening.
Meanwhile, many buildings and homes have been reduced to an uninhabitable mess of glass and as many as 300,000 people have been left homeless, Beirut's governor Marwan Aboud said.
He told the BBC: "Beirut needs food, Beirut needs clothes, houses, materials to rebuild houses. Beirut needs a place for the refugees, for its people."
A number of countries have offered humanitarian assistance. Three French planes are due to arrive carrying 55 rescuers, medical equipment and a mobile clinic equipped to treat 500 people, and President Emmanuel Macron will visit on Thursday.
The EU, Russia, Tunisia, Turkey, Iran and Qatar are all sending relief supplies. The UK is also ready to send medical experts and humanitarian aid, Foreign Secretary Dominic Raab said.
- Common industrial chemical used mainly as fertiliser in agriculture
- Also one of the main components in explosives used in mining
- Not explosive on its own, ignites only under the right circumstances
- When it explodes, it can release toxic gases including nitrogen oxides and ammonia gas
- Strict rules on how to store it safely: site has to be fire-proofed, and not have any drains, pipes or other channels in which ammonium nitrate could build up
What's the background?
The explosion comes at a sensitive time for Lebanon. With Covid-19 infections on the rise, hospitals were already struggling to cope. Now, they are faced with treating thousands of injured people.
The country is also going through the worst economic crisis since the 1975-1990 civil war, and tensions were already high with street demonstrations against the government. People have to deal with daily power cuts, a lack of safe drinking water and limited public healthcare.
Lebanon imports most of its food and large quantities of grain stored in the port have been destroyed causing fears of widespread food insecurity to come. The future of the port itself is in doubt due to the destruction caused.
President Aoun announced that the government would release 100 billion lira (£50.5m; $66m) of emergency funds but the impact of the blast on the economy is expected to be long-lasting.
The explosion happened close to the scene of a huge car bombing which killed former Prime Minister Rafik Hariri in 2005. A verdict in the trial of four men accused of orchestrating the attack was due on Friday at a special court in the Netherlands, but this has been postponed until 18 August out of respect for the victims of Tuesday's blast.
Have you been personally affected by this story? If you feel able to do so please share your experiences by emailing email@example.com.
Please include a contact number if you are willing to speak to a BBC journalist.