Lebanon is holding a day of mourning after seven people died and dozens were hurt in some of the worst violence for years in the capital, Beirut.
Gunfire broke out on Thursday during a protest by Shia Muslim groups against the judge investigating last year's huge blast at the city's port.
Hezbollah, which organised the protest, says demonstrators were fired on by gunmen on rooftops.
They blamed a Christian faction, although the group denies the charge.
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.
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.
The clashes continued for several hours before calm was restored.
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". It later said it had arrested nine people "from both sides, including a Syrian".
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.