At least nine people have been killed in clashes between rival pro- and anti-Damascus gunmen in the northern city of Tripoli, testing Lebanon's fragile security situation, security sources said on Wednesday.
Top local security, political and religious officials met and agreed on a ceasefire to take effect at 1400 GMT, an AFP correspondent reported.
But nine civilians were wounded, caught up in sporadic shooting which erupted as people started to venture out into the streets after the ceasefire, security sources said.
Two people died in the latest violence after a bloody day Tuesday which saw six people killed in street battles between gunmen from Sunni and Alawite groups, whose rival districts are symbolically divided by a thoroughfare called Syria Street.
Amid the ceasefire efforts, security sources said a ninth person died on Wednesday of his injuries.
The port city of Tripoli, the second largest metropolis in Lebanon, remained tense, with armed men driving through the city and shooting rounds of live fire into the air, the correspondent said.
The army said it will open talks with city elders to restore stability and has also boosted its presence in the areas where the fighting has been taking place.
The latest round of fighting has rattled the already fragile security situation in Lebanon, which lived under three decades of Syrian domination and remains deeply divided between supporters and opponents of the Damascus government.
The dead in Tripoli included a 13-year-old boy, while more than 80 other people have been wounded, including a boy of six who was paralysed by a gunshot wound and 15 soldiers, security sources said.
The fighting with anti-tank rockets and automatic weapons first erupted late Monday in Tripoli, home to a Sunni community hostile to Syrian President Bashar al-Assad, who is an Alawite, an offshoot of Shiite Islam.
Prime Minister Najib Mikati, a native of Tripoli, on Wednesday raised fresh concern at "efforts to drag Lebanon more and more into the conflict in Syria when what is required is for leaders to cooperate … to protect Lebanon from the danger."
The authorities have instructed the army and security forces "to bring the situation under control, to prohibit any armed presence and to arrest those implicated" in the violence, he said in a statement.
The army said: "In order to prevent attempts to drag the whole of Lebanon into a state of unrest … the army command announces it will enter into dialogue with the city's leaders and officials, particularly in Bab al-Tebbaneh and Jabal Mohsen."
Exchanges of gunfire on Monday between Bab el-Tebbaneh and Jabal Mohsen sparked the latest violence. Civilians have evacuated their homes, while fires have wrecked several buildings.
"My family and I have left our house in Bab al-Tebbaneh … But I don't have the money to leave for good. It's unfortunate this area will always be an open playing field for political struggles," taxi driver Abu Khodr Sharbini told AFP.
Fighters in Bab al-Tebbaneh charge the Syrian regime lit the spark for the latest round of clashes. "They do this to cover up for their crimes in Syria," where an anti-Assad revolt has raged since March 2011, a fighter said.
But Ali Fidda, a local Alawite official from Jabal Mohsen, said his side was only defending itself in the predominantly Sunni city. "We understand there are differences … But we are prepared to defend ourselves if we have to."
The United Nations, France and the United States have expressed concern over the latest flareup and warned against a spillover of the Syrian conflict.
"The situation in Lebanon has become more precarious and the need for continued international support to the government and the Lebanese Armed Forces increasingly important," UN under secretary general Jeffrey Feltman said.
The latest unrest in Tripoli, which has been the scene of several deadly incidents over the past year, follows a wave of tit-for-tat kidnappings of Lebanese citizens in Syria and of Syrians living in Lebanon.