Two men have been killed in clashes in the Lebanese capital, Beirut, between supporters of the Shia Islamist group, Hezbollah, and a rival Sunni faction.
The violence erupted in Burj Abu Haidar following a fight outside a mosque.
The Lebanese army later intervened when the fighting spread to neighbouring parts of the city.
Leaders of Hezbollah and the pro-Syrian conservative al-Ahbash faction later met and issued a joint statement expressing regret for the violence.
Sectarian tensions have risen recently in Lebanon, amid reports that a UN tribunal could soon implicate members of Hezbollah in the assassination in 2005 of former Prime Minister, Rafik Hariri.
Hezbollah's leader has dismissed the tribunal as an "Israeli project".
The BBC's Maha Barada in Beirut says calm has returned to the city after the armed clashes on Tuesday, during which machine guns and rocket-propelled grenades were fired through the streets of Burj Abu Haidar.
Security officials said one of those killed was Mohammed Fawaz, a local Hezbollah leader. It is not yet clear who the other casualty was, although an al-Ahbash official said one of its supporters had been killed.
A witness, Salah, said he had been inside the mosque in Burj Abu Haidar when he heard a commotion outside and people screaming "calm down". Twenty minutes later, gunshots rang out.
"They were shooting at the mosque. I think these people are crazy. They must have gone home to get their friends," he told the Associated Press.
The army later cordoned off the area and held a meeting with both parties, who agreed to a ceasefire and for an investigation to be opened.
A joint statement said the incident had been the result of a "personal dispute", and that both sides would end their armed presence.
"[We] stress that this was an individual unfortunate incident," it added.
A spokesman for al-Ahbash, Abdul Qadir al-Fakhani, told the BBC that the incident did not have any political or sectarian background.
The fighting was the worst since May 2008, when a political crisis led to street fighting between supporters of Hezbollah and those of the current pro-Western Sunni Prime Minister, Saad Hariri, the son of Rafik.
The sectarian strife took country to the brink of civil war.