Image source, ReutersImage caption, The Lebanese army evacuated people from the Tayouneh-Badaro area as the gunfire erupted
Five people have been shot dead at a protest in the Lebanese capital, Beirut, against the judge investigating last year's devastating port explosion.
Heavy gunfire erupted as supporters of the Hezbollah and Amal movements demanded Judge Tarek Bitar's removal.
They said snipers on rooftops attacked them to drag the country into strife.
Huge tension surrounds the probe into the port blast, with Hezbollah accusing the judge of unfairly singling out allied former government ministers.
What began as a protest against Judge Bitar outside the Palace of Justice, with chanting and marching, escalated significantly, reports the BBC's Anna Foster in Beirut.
Heavy, rolling gunfire erupted in the streets as the crowd passed through a roundabout in the central Tayouneh-Badaro area.
Image source, ReutersImage caption, Hezbollah said snipers opened fire at supporters demanding the removal of Judge Tarek Bitar
Our correspondent says there were very loud explosions as the Lebanese army moved into position and tried to work out where the shots were coming from. But, she adds, there was such a level of confusion that nobody knew for sure who was firing at whom.
Hospital and military sources said the dead included two men who were shot in the head and the chest, as well as a woman who was hit by a stray bullet while inside her home.
Bullets also landed near a local school, forcing students to duck for cover under their desks.
Hezbollah and Amal said in a joint statement that the protesters were targeted by "snipers positioned on the roofs of buildings".
"This attack by armed and organised groups aims to drag the country into a deliberate strife, the responsibility of which must be borne by the instigators and the parties that hide behind the blood of the victims and martyrs of the port in order to achieve malicious political gains," they added.
Image source, ReutersImage caption, The army warned that it would open fire against any gunmen in the area
Prime Minister Najib 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 restore calm and search for the assailants, and warned that they would "shoot at any gunman on the roads and at anyone who shoots from any direction".
Earlier on Thursday, a court dismissed a legal complaint brought by two of the former ministers whom Judge Bitar has sought to question in connection with the port explosion.
Relatives of the victims and activists had condemned the complaint, which caused the investigation to be suspended for the second time in three weeks.
No-one has been held accountable for the August 2020 disaster, in which killed 219 people were killed and 7,000 others were wounded.
A fire triggered the detonation of 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.
Victims' families have expressed their support for Judge Bitar and alleged that the country's political leadership is trying to shield itself from scrutiny.