* Clashes hit Beirut, Tripoli
* Army says will stamp out unrest
* Calls for prime minister to step down
* Violence provoked by assassination of security official
By Dominic Evans and Angus MacSwan
BEIRUT, Oct 22 (Reuters) - The Lebanese army promised decisive action to quell unrest linked to the Syria conflict as gunbattles flared in the capital Beirut and elsewhere on Monday after the assassination of a senior intelligence officer last week.
The army command urged political leaders to be cautious in their public statements so as not to inflame passions further.
It issued the warning after troops and gunmen exchanged fire in Beirut's southern suburbs on Monday morning, wounding five people, while protesters blocked roads with burning tyres.
In the northern city of Tripoli, four people were killed, including a 9-year-old girl, and 12 wounded in clashes overnight and in the morning, security and medical sources said.
The violence heightened fears that the civil war in Syria next door was spreading into Lebanon, upsetting its delicate political balance and threatening to usher in a new era of bloodshed between Lebanese allies and opponents of President Bashar al-Assad.
Lebanon has been boiling since Friday after Brigadier General Wissam al-Hassan, an intelligence chief opposed to the Syrian leadership, was assassinated in a car bombing.
Many politicians have accused Syria of being behind the killing and angry protesters tried to storm the government palace after Hassan's funeral on Sunday.
Opposition leaders want Prime Minister Najib Mikati to resign, saying he is too close to Assad and his Lebanese militant ally Hezbollah, which is part of Mikati's government.
"The last few hours have proven without doubt that the country is going through a decisive and critical time and the level of tension in some regions is rising to unprecedented levels," the army said in a statement.
"We will take decisive measures, especially in areas with rising religious and sectarian tensions, to prevent Lebanon being transformed again into a place for regional settling of scores, and to prevent the assassination of the martyr Wissam al-Hassan being used to assassinate a whole country."
Troops in full combat gear and armoured personnel carriers guarded traffic intersections and government offices on Monday, with barbed wire and concrete blocks protecting buildings.
Beirut was noticeably quieter than usual as people stayed at home because they feared more violence. In the downtown, many normally busy cafes and coffee shops were empty or shut and the area was free of the habitual traffic chaos.
Lebanon is still haunted by its 1975-1990 civil war, which made Beirut a byword for carnage and wrecked large parts of the city.
Since then it has undergone an ambitious reconstruction programme and enjoyed periods of economic prosperity due to its role as a trading, financial and tourist centre. All that is now threatened.
The army statement appealed to all Lebanese to act responsibly and "not to let emotional reactions control the situation". Troops would stamp out any violence, it said.
GUNFIGHTS IN THE CITY
The clashes in Beirut on Monday morning took place on the edge of Tariq al-Jadida, a Sunni Muslim district that neighbours Shi'ite Muslim suburbs in the south of the capital.
Residents had earlier reported heavy overnight gunfire around Tariq al-Jadida between gunmen armed with rifles and rocket-propelled grenades.
In Tripoli, a 9-year-old girl shot by a sniper was one of three people killed in overnight clashes there. Nine people were wounded, medical and security sources said.
The sources said the two dead men were from the Sunni Muslim district of Bab al-Tabbaneh and were killed after gunmen there exchanged rocket and gunfire with the mainly Alawite neighbourhood of Jebel Mohsen.
In a later incident on Monday morning, a woman was killed and three people wounded by gunfire in the Alawite district. Tripoli has frequently been hit by clashes between Sunnis and Alawites sympathetic to different sides in the Syria war.
The violence escalated after thousands of people had turned out in Beirut's downtown Martyrs' Square for the funeral for Hassan, who was buried with full state honours in an emotionally charged ceremony.
As the funeral ended, hundreds of opposition supporters broke away and tried to storm the nearby prime minister's office, prompting security forces to fire tear gas and shots in the air to repulse them.
Opposition leaders appealed for calm.
"We want peace, the government should fall, but we want that in a peaceful way. I call on all those who are in the streets to pull back," former prime minister Saad al-Hariri said on Sunday evening.
The crisis underscores local and international concern that the 19-month-old uprising against Assad is dragging in Syria's neighbours Lebanon, Turkey and Jordan.
Sunni-led rebels are fighting to overthrow Assad, who is from the Alawite minority that has its roots in Shi'ite Islam. Lebanon's religious communities are divided between those that support Assad and those that back the rebels.
Hassan, 47, was a senior intelligence official who had helped uncover a bomb plot that led to the arrest and indictment in August of a pro-Assad former Lebanese minister.
A Sunni Muslim, he also led an investigation that implicated Syria and the Shi'ite Hezbollah in the 2005 assassination of Rafik al-Hariri, a former prime minister of Lebanon.
Damascus and Hezbollah have condemned Hassan's killing.
Mikati offered to resign at the weekend to make way for a government of national unity but President Michel Suleiman persuaded him to stay in office to allow time for talks on a way out of the political crisis.
Ambassadors from the United States, China, Russia, Britain and France met Suleiman on Monday and appealed to Lebanese leaders to resolve the situation peacefully. They expressed support for Suleiman's efforts to start a dialogue among politicians.
One Western diplomat, asked if the Mikati government would survive, told Reuters: "I think it looks more likely today than yesterday that he will come through in the short term. It will take time to form a consensus on an alternative and in the meantime the security situation needs time to recover."