SIDON, Lebanon (Reuters) - Lebanese soldiers fought Sunni Islamist gunmen in the southern city of Sidon for a second day on Monday in one of the deadliest outbreaks of violence fuelled by sectarian rifts over the civil war in neighbouring Syria.

The army said 12 soldiers had been killed in clashes which broke out on Sunday after security forces detained a follower of the hardline Sunni Muslim cleric Sheikh Ahmed al-Assir. His supporters retaliated by opening fire at an army checkpoint.

The army pledged to crush Assir's forces, accusing them of trying to plunge Lebanon into a repeat of its 1975-1990 civil war. Contagion from the Syrian conflict has already exploded in deadly street fighting in the northern city of Tripoli and rocket attacks in Beirut and the Bekaa Valley.

Security sources put the army death toll at 17, with 65 wounded. It was not possible to verify casualties among Assir's fighters, although the security sources said they believed more than 20 of his men were also killed. One said Assir himself was wounded.

Soldiers were surrounding the mosque to the east of the ancient Mediterranean port city, where Assir's fighters were based. The mosque was heavily damaged from 24 hours of ferocious exchanges of rocket and gunfire.

"Come and save your people who are being massacred," said an appeal on Assir's Twitter account on Monday.

Sidon had been on edge since violence erupted last week between Sunni and Shi'ite Muslim fighters, at odds over the Syrian conflict which pits mainly Sunni rebels against President Bashar al-Assad, who is a member of the country's minority Alawite sect, an offshoot of Shi'ite Islam.

Tensions escalated when the Lebanese Shi'ite militant group Hezbollah sent fighters into Syria to lead the recapture of a strategic border town by Assad's forces.

"The army has tried for months to keep Lebanon away from the problems of Syria, and it ignored repeated requests for it to clamp down on Sheikh Ahmed al-Assir's group," the military command said in a statement on Sunday.

But Sunday's violence "has gone beyond all expectations. The army was attacked in cold blood in an attempt to light the fuse in Sidon, just as was done in 1975," it said, referring to the year that Lebanon's own civil war began.

Slideshow (4 Images)

Assir, whose supporters accuse the army of giving cover to Hezbollah gunmen, called for people across the country to join him and demanded that "honourable" soldiers defect.

Syria's conflict has strained fragile sectarian relations across Lebanon, triggering clashes in Sidon and other cities.

In recent weeks, clashes have also rocked Lebanon's Bekaa Valley near the Syrian border, which is home to a large Shi'ite population and also Sunni backers of the Syrian opposition.

In the northern port of Tripoli on Monday, masked gunmen cut off a main thoroughway and several roads around the city with cement blocks and burning tires, in a show of support for Assir.

Residents said Sunni gunmen in the Bab al-Tabbaneh district fired rockets on army positions overnight, but no casualties were reported. The militants attacked journalists who approached the areas they have blocked, breaking their cameras and threatening them not to get closer.