TRIPOLI: The Islamic State group claimed deadly car bombings in Libya on Friday as the international community struggles to find ways to end the chaos in the North African nation.

Libyan security sources said 31 people were killed and 40 wounded in three simultaneous attacks in the town of Al-Qoba that targeted a police headquarters, a petrol station and the home of the parliament speaker.

A statement signed by the IS branch in the eastern Cyrenaica region said two of its militants carried out suicide bombings in retaliation for air strikes on the jihadist stronghold of Derna this week.

It said the attacks targeted forces of General Khalifa Haftar who launched a bloody campaign in May last year to rid Libya of militias who have thrived since an uprising more than three years ago.

“This is a message to anyone who is tempted to attack the soldiers of the caliphate (IS) or any Muslim,” the IS statement said.

Egypt, in coordination with Haftar's forces, pounded jihadist positions in Derna on Monday after a gruesome IS video showed the beheading of 21 Coptic Christians, most of the Egyptian.

After its citizens were murdered, Egypt called for international military action against IS and echoed demands by Libya's recognised government for the lifting of a UN arms embargo to tackle the militants.

But Western and Arab states have flinched at the suggestion of force, and UN envoy Bernardino Leon told the UN Security Council Wednesday that the only cure for Libya's trauma was political.

Some analysts have warned however IS was expected to gain more strength in Libya, after having seized swathes of Syria and Iraq, and said the international community was running out time.

But others cautioned that military action in Libya, which has been awash with weapons since dictator Moamer Kadhafi was ousted and killed in a 2011 NATO-backed uprising, would pour fuel on the fire.

IS rise in Libya

The oil-rich North African nation has two rival governments and parliaments, one recognised by the international community and the other with ties to militants.

Since Kadhafi's ouster, Libya's beleaguered authorities have been struggling to rein in powerful armed militias who have mushroomed after the uprising and are fighting for power.

There is increasing concern that some of these militias have pledged allegiance to the Sunni Muslim extremist IS. In recent weeks IS has claimed several bloody attacks, including a January assault on a Tripoli hotel that killed nine people, five of them foreigners.

“The threat of Islamic State in Libya is set to increase exponentially, “analyst Mohamed El-Jareh, a non-resident fellow with the Atlantic Council's

Hariri Centre for the Middle East, warned on Friday.

There has also been increased reports that gunmen who claim affiliation to the group are tightening their grip on power.

On Thursday a group of armed men seized Sirte university and a conference centre, days after taking control of state radio and other government buildings in the coastal city, witnesses said.

Sirte, the hometown of Kadhafi, is a stronghold of Ansar al-Sharia, classified as a terrorist organisation by the United Nations which is known to be close to Al-Qaeda.

Ansar al-Sharia has also a presence in Benghazi, where Haftar has been battling militants, as well as in Derna — historically Libya's most radical Islamist city — and Sabratha in the west.

Its ties with IS are unclear although several of its members are reported to have defected to the jihadist group. IS is also said to have cells in Libya's vast southern desert, as well as in Tripoli.

On Friday five Egyptians were among the 31 people killed in Al-Qoba, a local official and medics said. Most of the dead were queueing for petrol at a station in the town.

Medics said parliament speaker Aguila Salah Issa was not at home at the time of the bombings.

The internationally recognised parliament has been based in Libya's remote eastern city of Tobruk, since the Fajr Libya militia alliance overran Tripoli in August.