The blast killed at least 100 people and injured more than 4,000 others.
The whole city was shaken by the explosion and a mushroom cloud could be seen spreading over the port area.
President Michel Aoun said the blast was caused by 2,750 tonnes of ammonium nitrate stored unsafely in a warehouse.
Ammonium nitrate is used as a fertiliser in agriculture and as an explosive.
President Aoun declared three days of mourning which started on Wednesday. Opening an emergency cabinet meeting, he said: "No words can describe the horror that has hit Beirut last night, turning it into a disaster-stricken city".
"Amid last night's smoke, flames and destruction, I would like to laud the zeal of the Lebanese who rushed to the blast location and perimeter and the hospitals to offer support and assistance," he added.