At least four people have been killed in the clashes between rival groups operating under the UN-backed government.

At least four people have been killed and seven others wounded in clashes that broke out between rival armed groups in Libya’s capital, Tripoli, as they attempt to take control of the city.

The health ministry declared a state of emergency on Monday, according to local media, after the Sunday evening clashes continued to escalate.

The fighting erupted between local militias and al-Kani tribal fighters from Tarhouna, southeast of Tripoli, who are sending reinforcements to the country’s north.

Both sides technically operate under Libya’s UN-recognised Government of National Accord (GNA).

Heavy weapons, including artillery, have been used in the fighting, according to witnesses. Residential areas have been hit by what seems to be random shelling and several families have had to evacuate their homes.

Roads were blocked, while tanks and armoured vehicles were seen at several places across the city.

The Presidential Council (PC) responded by condemning the GNA for the eruption of violence in Tripoli.

“We warn these gangs and outlawed groups that have terrorised civilians and residents; there is no space for such lawlessness and chaos,” said the PC in a statement.

“We have given orders to the interior ministry to counter these attacks.

“Anyone who is found to be involved in these incidents will face justice.”

The National Committee for Human Rights in Libya said in a statement on Monday that it was deeply concerned over the outbreak of the violence, Libya News reported.

The statement called on all parties to the conflict to lay down their arms immediately.

The incident follows a deadly attack last week on a checkpoint in western Libya, in which six soldiers loyal to the GNA were killed.

On Saturday, an affiliate of the Islamic State of Iraq and the Levant (ISIL, also known as ISIS) group claimed responsibility for the attack in Zliten, a town that lies 170km from the capital.

Libyan authorities announced the arrest of the suspected perpetrators.

“Soldiers of the caliphate assaulted the ‘Wadi Kaam’ gate, on the Zliten-Khoms road two days ago, targeting a gathering of apostate security elements” loyal to Libya’s UN-backed unity government, the armed group said via its Amaq media arm.

In an interview on Saturday with Libya’s private al-Ahrar broadcaster, the unity government’s Interior Minister Abdelsalam Ashour said “the perpetrators of the attack were apprehended”, without specifying how many people were arrested.

Seven years after the 2011 NATO-backed overthrow of Muammar Ghaddafi, Libya remains divided between the UN-backed GNA in Tripoli and a rival administration in the east, backed by self-declared commander Khalifa Haftar.

A myriad of armed groups and people traffickers have taken advantage of the chaos to gain a foothold in the North African country.