Egyptian jets have bombed Islamic State (IS) targets in Libya, a day after the group there released a video showing the beheading of 21 Egyptian Christians.

It was the first time Egypt announced military action against Islamist targets in its western neighbour, having previously denied it targeted militants there.

Egypt said the dawn strike hit militant camps, training sites and weapons storage areas in neighbouring Libya, where civil conflict has plunged the country into near anarchy and created havens for armed factions.

While Cairo is believed to have provided clandestine support to a Libyan general fighting a rogue government in Tripoli, the mass killings pushed president Abdel Fattah al-Sisi into open action, expanding his battle against Islamist militancy.

"Your armed forces on Monday carried out focused air strikes in Libya against Daesh camps, places of gathering and training, and weapons depots," the military said in a statement, using the Arabic word for IS.

Libya's air force said it also participated in Monday's attack.

An F-16 fighter jet prepares for take-off, shown in footage screened on Egyptian TV ( AFP: HO/Egyptian TV )

"There are casualties among individuals, ammunition and the (Islamic State) communication centres," Libyan air force commander Saqer al-Joroushi told Egyptian state television, adding that between 40 to 50 militants were killed.

It was not possible to confirm those numbers.

Witnesses told news agency AFP there were at least seven air strikes in Derna in the east, a hotbed of militancy since Libyan dictator Moamar Gaddafi was overthrown in 2011. It was not immediately clear whether other areas were also hit.

State television showed footage of Egyptian fighter jets it said were taking off to conduct the strikes.

"Avenging Egyptian blood and retaliating against criminals and killers is a duty we must carry out," the military said.

The air strikes came hours after Mr Sisi threatened a "suitable response" to the killings of the Copts, who had travelled to Libya seeking work.

Mr Sisi, a former army chief, faced a chorus of demands to retaliate after the beheadings.

Pope Francis voices his sadness

The 21 Egyptian Coptic Christians were marched to a beach, forced to kneel and then beheaded on video, which was broadcast via a website that supports IS.

Before the killings, one of the militants stood with a knife in his hand and said: "Safety for you crusaders is something you can only wish for."

Afterwards, he says: "And we will conquer Rome, by the will of Allah."

Pope Francis departed from the script of an address to members of the Church of Scotland to express his deep sadness over the IS killings.

"Their only words were 'Jesus, help me!' They were killed simply for the fact that they were Christians," he said in his native Spanish, departing from the Italian he uses at most formal events.

The leader of the world's 1.2 billion Catholics, who has said it is "lawful" to stop an unjust aggressor, also said the "martyrs belong to all Christians".

"The blood of our Christian brothers and sisters is a testimony which cries out to be heard," he said.

"It makes no difference whether they be Catholics, Orthodox, Copts or Protestants. They are Christians!"

Christians make up about a tenth of a predominantly Muslim population in Egypt.

Egypt's Coptic Christian pope was one of the public figures who backed Mr Sisi when he ousted the Islamist president Mohamed Morsi in 2013 after mass protests against him.

The beheadings could pile pressure on Mr Sisi to show he is in control of Egypt's security, even though he has already made progress against Islamist militant insurgents in the Sinai.

Egypt upgrades military hardware

The IS video purports to show the beheading of Egyptian Coptic Christians in Libya. ( Al Hayat )

Mr Sisi, who has called for a global effort to eradicate militancy, which he says is harming Islam, sees radical groups in Libya as a major threat to Egypt's security.

Fears that the crisis could spill across the border have prompted Egypt to upgrade its military hardware.

France has said Egypt will order 24 Rafale fighter jets, a naval frigate and other equipment in a deal to be signed in Cairo worth more than $5.7 billion.

French president Francois Hollande said he and Mr Sisi wanted the United Nations Security Council to discuss Libya and take new measures against IS, whose influence has spread rapidly from its original Syrian base.

Egypt, the Arab world's most populous nation, has not taken part directly in the US-led air strikes against IS strongholds in Iraq and Syria, focusing instead on the increasingly complex insurgency at home.

The United Arab Emirates, a close ally of Mr Sisi, said it "would put all its capabilities to support ... Egypt's efforts to eradicate terrorism and the violence against its citizens", according to the UAE foreign minister.

Reuters/AFP