Libya's legally installed government has sent fighters to confront the Islamic State of Iraq and the Levant (ISIL) in the northern city of Sirte.

Sources told Al Jazeera on Tuesday that the Tripoli-based government deployed Misrata's 166 battalion, backed by rebels, to tackle ISIL in Sirte.

The battalion's commander said that the operation involved taking back key buildings and state institutions.

Libya has been gripped by chaos since longtime leader Muammar Gaddafi was overthrown and killed more than three years ago. 

The North African country has failed to build up a national army and efficient state institutions since the end of Gaddafi's one-man rule, and is now effectively dominated by former rebel brigades who disagree over how to govern Libya and share its oil wealth.

The country has had two rival governments and parliaments since a group called Libya Dawn seized the capital in August, and set up its own government and parliament.

In November, Libya's supreme court invalidated the UN-recognised parliament in Tobruk, which had fled from Tripoli to the eastern city, after a legal challenge by a group of politicians.

The country's three main cities, Tripoli, Benghazi and Misrata, are largely controlled by militias aligned with Libya Dawn, and supportive of Omar al-Hassi, the head of Libya's legally installed government.

Amid the chaos, fighters pledging allegiance to ISIL have emerged in the cities of Derna and Sirte.

'Hostile aggression'

On Sunday, fighters pledging allegiance to ISIL released a video purporting to show the beheading of 21 Egyptian Christians .

Inside Story: Will Libya be Egypt's quagmire?

Egypt's military responded on Monday when it carried out air raids against what is claimed were ISIL camps, training sites and weapons storage areas in Libya's northeast.

Hassi denounced the raids as "terrorism" and said the international community should "condemn this hostile aggression, and pressure the Egyptian government to stop it".

At least seven civilians were reported killed in the strikes.

Meanwhile, the UN-recognised government in Tobruk supported the raids.

Prime Minister Abdullah al-Thinni, the head of the UN-recognised government, made a plea for Western military intervention on Monday and called for strikes on Tripoli and Ben Jawad.

Both areas are held by militias opposed to his government.

Global coalition

The UN Security Council said on Tuesday it would hold an emergency session on Wednesday on the escalating crisis.

Egyptian Foreign Minister Sameh Shoukry and the UN envoy to Libya are expected to brief the council on Wednesday afternoon in a public meeting.

Earlier on Tuesday, Egyptian President Abdel Fattah el-Sisi said "there is no choice" but to create a global coalition to confront Libya's rival militias, in an interview with France's Europe 1 radio.

The European Union has said it would meet with Egyptian and US government officials this week, but said it saw no role in any military intervention for now.

According to the UN at least 400,000 people have been displaced by fighting across Libya, with as many as 83,000 people living in settlements, schools and abandoned buildings.

Source: Al Jazeera and agencies