Egypt says it has bombed Islamic State targets in Libya, hours after the militants released video of apparent beheadings of 21 Egyptian Christians.
State TV said the dawn strikes had targeted camps, training sites and weapons storage areas. A second wave of strikes was reported hours later.
Libyan officials said Egypt hit targets in the militant-held city of Derna.
The strikes came amid widespread condemnation of the killings. The US and UN described them as "cowardly".
A video emerged on Sunday showing militants forcing a group of men to the ground and decapitating them.
The kidnapped Egyptian workers, all Coptic Christians, were seized in separate incidents in December and January from the coastal town of Sirte in eastern Libya, under the control of Islamist groups.
The video of the beheadings was posted online by Libyan jihadists who pledge loyalty to IS. It was one of the first such videos to come from an IS group outside its core territory in Syria and Iraq.
The video describes the Copts as "crusaders" and refers among other things to two women, wives of Coptic priests, whose alleged conversion to Islam triggered a sectarian dispute in Egypt in 2010.
IS militants claim to have carried out several attacks in Libya, which in effect has rival governments.
At the scene: Orla Guerin, BBC News, Al-Our, Egypt
Thirteen of the dead men came from the village of Al-Our, in Minya.
Screams of grief come from several houses in the dusty back streets, and groups of black-clad women go from house to house to offer condolences. One woman, wailing in the street, tells us she has lost five relatives.
In the packed courtyard of the church, mourners are gathering for a memorial service.
Local men say they are desperate for work and Libya is their only hope of a job. Many say they still have relatives working there, and that villagers will continue to go there in search of work.
Egypt did not give the locations of the air strikes, but a spokesman for Libya's internationally recognised Prime Minister Abdullah al-Thinni told the BBC that Egyptian jets had taken part in co-ordinated air strikes on Derna.
"Eight strikes have been conducted so far [in Derna]. The plan is to target all IS locations in the country wherever they are," said Mohamed Azazza.
Libyan air force commander Saqer al-Joroushi said the Egyptian strikes had been co-ordinated with Mr Thinni's government, and that his planes had also carried out strikes.
Between 40 and 50 people had been killed, he added.
Several hours later, the AP news agency quoted unnamed security officials as saying that Egyptian warplanes had again struck Derna.
'Inhuman criminal killers'
Egypt declared seven days of national mourning after the release of the video.
In a televised address, President Abdel Fattah al-Sisi described IS as "inhuman criminal killers".
"Egypt and the whole world are in a fierce battle with extremist groups carrying extremist ideology and sharing the same goals," he said.
He later visited St Mark's Cathedral in Cairo to offer his condolences to Coptic Pope Tawadros II.
Egypt is already fighting Islamist insurgents based in the Sinai peninsula who have declared their allegiance to Islamic State.
Leading international condemnation, the United States called the killings "despicable" and "cowardly".
Pope Francis expressed his "profound sadness".
In a statement, the UN Security Council "strongly condemned the heinous and cowardly apparent murder" of the Christians.
Libya is home to a large community of both Muslim and Coptic Egyptians, with most working in the construction sector.
In the first kidnapping in Sirte, in late December, a group of Coptic Christians was abducted at a fake checkpoint while trying to leave the city.
Days later, militants raided a residential compound in Sirte and separated Christians from Muslims before handcuffing their captives and taking them away.
Analysis: Jim Muir, BBC News
The butchering of the Egyptian Copts appears to signal Libya's arrival as yet another platform for the militants of IS, broadening the franchise and the challenge to Western powers and their regional allies.
Conditions seem to be ripe for them to flourish in Libya as they have in Iraq and Syria, filling and expanding niches left by failed and unjust governments, and a chaotic free-for-all of local militias.
Past horrors perpetrated and propagated by IS have apparently served only to attract more extremists to its black flag, creating a sense of dynamic momentum.
By bombing IS in Libya, President Sisi may have fallen into its trap and increased its appeal, given the repression he is meting out to Egyptian Islamists.
Libya has been in chaos since 2011 and the overthrow of its then-leader, Col Muammar Gaddafi.
Since then, numerous militia groups have battled for control.
It has two rival governments, one based in Tripoli and the other in Tobruk.
Meanwhile, the eastern city of Benghazi - where the 2011 revolution began - is largely in the hands of militant fighters, some with links to al-Qaeda.
The head of the US Defense Intelligence Agency warned last month that IS was assembling "a growing international footprint that includes ungoverned and under-governed areas", including Libya.
Libya's rival power bases
- Tripoli: government appointed by old parliament that challenged legitimacy of last year's elections
- Tobruk: internationally recognised government, ousted from capital not long after 2014 election
- Both backed by loose alliance of militias focused on local interests
- Benghazi: second city and headquarters of 2011 Revolution, largely in hands of Islamist fighters, some with links to al-Qaeda
- Misrata: third city and main port, also loyal to Tripoli authorities. Its militias keep them in power.
- Derna: home to Islamic State