Lebanese president Michel Suleiman has formally accepted the resignation of prime minister Najib Makiti, who stepped down blaming government infighting.

On Friday, Mr Makiti announced his whole government was quitting because of arguments over elections and the extension to the term of office of an internal security chief.

Mr Makati has said he hoped the move would prompt leaders of the different factions to "shoulder their responsibilities".

Mr Suleiman asked Mr Mikati's government to assume a caretaking role while a new government is being formed.

Mr Mikati's unexpected resignation throws the country into uncertainty at a time when it is being hit by sporadic violence enflamed by the civil war in neighbouring Syria.

Lebanon has long been a tinderbox of inter-ethnic and religious rivalries and has only recently recovered from a devastating civil war.

The two main political groups in the country support different sides in the Syrian civil war, in which more than 70,000 have died.

Image Caption:Lebanese Prime Minister Najib Mikati has resigned

Most Sunni Muslims in Lebanon support the uprising against Syria's leader Bashar al-Assad, who is from the Syria's Alawite minority.

But many Alawites also live in north Lebanon and sometimes the opposing groups clash violently.

It has led to fighting on the streets of Lebanon where tens of thousands of Syrian refugees have fled, with six killed and more than 20 wounded in Tripoli on Thursday.

Another 12 died in street battles in the northern city of Tripoli in December.

Mr Mikati has been prime minister since June 2011, heading a government dominated by the Shiite militant group Hezbollah and its allies, many of whom have a close relationship with Assad's regime.

But his relations with Hezbollah have never been smooth with Hezbollah frequently accusing him of loyalty to the pro-Western opposition.

He stepped down on Friday in part as a protest over Hezbollah's refusal to extend the tenure of the country's police chief, Maj Gen Ashraf Rifi, who at 58 is about to hit the mandatory retirement age for his rank.

Mr Rifi, like Mr Mikati, is a Sunni Muslim who is considered a foe by Hezbollah.

In his speech Friday, Mr Mikati said that if Mr Rifi was not allowed to stay on, his departure would send the police department into "a vacuum" at a time when a solid leader was needed.

As well as the outbreaks of violence, Lebanon has been accused by Syria of turning a blind eye to its citizens aiding rebels either by running weapons across the border or by actually taking part.

On Thursday a Lebanese citizen was captured by the Syrians after infiltrating the country to fight alongside rebel forces, state television said.

On Tuesday, President Michel Sleiman denounced as "unacceptable" a series of Syrian air raids a day earlier that targeted sites inside Lebanese territory. Syria denied launching the attack.

Israel fears that if Hezbollah gets the upper hand in Lebanon, it may use Syrian weapons smuggled across the border against its southern neighbour, which could then spark a new Middle Eastern war.