Egypt says it has bombed Islamic State targets in Libya, hours after the group published video showing the apparent beheadings of 21 Egyptian Christians.
State TV said the dawn strikes had targeted camps, training sites and weapons storage areas.
It did not give further details but witnesses reported air strikes in the port city of Derna, held by militants.
A video emerged on Sunday showing a group wearing orange overalls being forced to the ground and decapitated.
IS militants claim to have carried out several attacks in Libya, which is in effect without a government.
The kidnapped Egyptian workers, all Coptic Christians, were seized 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 killings were described as "barbaric" by al-Azhar, the highly regarded theological institution which is based in Egypt.
Egypt's military said Monday's air strikes were "to avenge the bloodshed and to seek retribution from the killers".
"Let those far and near know that Egyptians have a shield that protects them," it said.
The statement said all planes involved had returned safely.Analysis - Orla Guerin, BBC News, Cairo
Most of the 21 Copts kidnapped in Libya were labourers from an impoverished village in Upper Egypt.
A caption accompanying the video made it clear they were targeted because of their faith. It referred to the victims as "people of the cross, followers of the hostile Egyptian church".
President Sisi has said in the past that militants in Libya are a danger not just to Egypt, but also to the Middle East.
Egypt has provided assistance to the Libyan government, what remains of it, and the Libyan army.
The Egyptian leader will now be under pressure to deliver a robust response. There is speculation that could come in the form of air strikes across the border.
Earlier, President Abdel Fattah al-Sisi said Egypt had the "right to respond" against IS, whom he described 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."
Egypt has declared seven days of national mourning.
Leading international condemnation, the United States called the purported killings "despicable" and "cowardly".
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.Rival governments
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 Islamist 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.
On Sunday, Italy closed its embassy in Tripoli. Italy, the former colonial power, lies less than 500 miles (750km) from Libya at the shortest sea crossing point.
Despite the turmoil in Libya, thousands of Egyptians go to the country looking for work.
"These people are not in Libya for tourism, for joy, to steal or even to beat others, these people went to Libya to work and earn some money," said Shehata Walham, the brother of one of those killed.
There had been demonstrations in Egypt calling on the government to do more to secure the release of those held.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