Lebanese Prime Minister Najib Mikati has announced a day of mourning for Friday, a day after deadly fighting erupted in Beirut.
At least six people were killed and 32 others injured when gunfire broke out in the Lebanese capital.
It began during a protest by the Shia Muslim groups Hezbollah and Amal against the judge investigating last year’s huge blast at the city’s port.
They say snipers from the Christian Lebanese Forces (LF) shot at crowds.
The LF faction has denied instigating what was some of Lebanon’s worst violence in years.
“We will not allow anyone to take the country hostage to their own interests,” the country’s President Michel Aoun said.
Huge tension surrounds the inquiry into the port explosion that killed 219 in August 2020.
Swathes of the city were devastated by the blast, but no-one has yet been held accountable.
Hezbollah and its allies say the investigating judge is biased, but the victims’ families support his work.
What began as a protest outside the Palace of Justice – the main court building – by hundreds of people arguing the investigation had become politicised and demanding the removal of Judge Tarek Bitar quickly escalated.
Heavy gunfire erupted in the streets as the crowd passed through a roundabout in the central Tayouneh-Badaro area.
Local residents had to flee their homes and schoolchildren ducked for cover under their desks as men armed with automatic rifles and rocket-propelled grenade launchers – believed to have been members of Shia and Christian militias – exchanged fire in the streets.
The clashes continued for several hours before calm was restored.
At a nearby school, teachers instructed young children to lie face down on the ground with their hands on their heads, a witness told Reuters news agency.
Hospital and military sources said some of those killed had been shot in the head. They included a woman who was hit by a stray bullet while inside her home.
For now, an uneasy truce
By Anna Foster, BBC News, Beirut
The streets around Tayouneh are still thickly carpeted with shattered glass after hours of gun and rocket fire.
Some families who live there left their homes last night in case violence flared again.
President Aoun said it wasn’t acceptable for arms to return as communication between the Lebanese parties. But these divisions run deep.
Shia politicians accuse the presiding judge Tarek Bitar of bias.
But families of those who died in the port blast died back him, saying MPs are trying to evade justice.
For now there’s an uneasy truce. But all sides are waiting to see what direction the investigation will now take, and whether its outcome might be swayed.
Lebanese Forces leader Samir Geagea condemned the violence and appealed for calm.
“The main cause of these developments lies in the presence of uncontrolled and widespread weapons that threaten the citizens at any time and in any place,” he tweeted.
Mr Mikati called on everyone to “calm down and not be drawn into sedition for any reason whatsoever”.
The army said it had deployed troops to search for the assailants, and warned that they would “shoot at any gunman on the roads”.
Earlier on Thursday, a court dismissed a legal complaint brought by two former government ministers and Amal MPs – Ali Hassan Khalil and Ghazi Zaiter – whom Judge Bitar has sought to question on suspicion of negligence in connection with the port explosion.
The two men, who deny any wrongdoing, accused the judge of bias.
Families of the victims had condemned the complaint, which caused the inquiry to be suspended for the second time in three weeks.
They have accused the country’s political leadership of trying to shield itself from scrutiny.
“Keep your hands off the judiciary,” they warned the cabinet on Wednesday after ministers allied to Hezbollah demanded that Judge Bitar be replaced.
The port blast happened after a fire detonated 2,750 tonnes of ammonium nitrate, a combustible chemical widely used as agricultural fertiliser, that had been stored unsafely in a port warehouse for almost six years.
Senior officials were aware of the material’s existence and the danger it posed but failed to secure, remove or destroy it.