David Cameron has spoken to Egyptian president Abdel Fattah el-Sisi to offer his condolences over the murder of the Egyptian Christians and to discuss how Britain and Egypt could work together to fight terrorism.
Mr el-Sisi and the Prime Minister agreed that a political solution was the best way to solve the Libyan crisis.
"The Prime Minister recognised that Egypt, as one of Libya's neighbours, had a particular interest in protecting itself from violent extremism on its borders and that both countries shared the same objective: a safe and secure Libya," a Downing Street spokeswoman said.
Egypt has called on the US-led coalition fighting Islamic State in Iraq and Syria to broaden the scope of their operations to include Libya, highlighting how the insurgent group has expanded its reach around the Arab world.
After the strikes, Egyptian president Abdel-Fattah el-Sissi spoke with France's president and Italy's prime minister about the Libya situation.
"What is happening in Libya is a threat to international peace and security," said el-Sissi, who also banned all travel to Libya by Egyptian citizens.
Libya's air force also participated in the air strikes on Libya, which targeted Derna, an eastern coastal city regarded as a base for fighters of the so-called Islamic State.
"There are losses among individuals, ammunition and the (Islamic State) communication centres," Libyan air force commander Saqer al-Joroushi told Egyptian state television, adding that dozens had been killed.
Joroushi, who is loyal to Libya's internationally recognised government, which set up camp in the city of Tobruk after losing control of the capital Tripoli, said there would be more strikes on Tuesday.
The war-torn North African state of Libya has been bombed by its neighbour, Egypt, military officials have confirmed. Egyptian jets hit Islamic State targets in Libya in retaliation for the murder of 21 Egyptian Christians. Their deaths were shown in a video released by the so-called Islamic State yesterday.
ITV News' Africa correspondent John Ray reports:
Egyptian jets bombed Islamic State targets in Libya in pre-dawn strike, military officials have said. Militant camps, training sites and weapons storage areas in neighbouring Libya were all hit.
And let those near and far know that the Egyptians have a shield that protects and preserves the security of the country, and a sword that eradicates terrorism.
Egyptian state television aired footage of fighter planes leaving a hangar with "Long live Egypt" emblazoned on the tails, followed by night-vision aerial footage showing bomb explosions and the aircraft returning in early daylight.
Egyptian state media ERTU TV has broadcast more footage which they say shows airstrikes against Islamic State targets in Libya.
Buildings and vehicles can be seen framed in cross-hairs, before they are destroyed.
Egyptian President Abdel Fattah al-Sisi visited the country's top cathedral to pay his condolences to Coptic Pope Tawadros II and the Christian community, a day after Islamic State released a video showing the beheading of 21 Egyptians in Libya.
Egyptian Prime Minister Ibrahim Mehleb and Interior Minister Mohamed Ibrahim accompanied al-Sisi on his visit.
David Cameron has said Libya must not be allowed to become a "safe haven for terrorists" as he condemned the "barbaric" murder of 21 Egyptian Coptics by Islamic State (IS).
The Prime Minister added: "I am appalled by the murder of Christians in Libya, a simply barbaric and inhumane act. My thoughts are with the families of those killed and the UK stands united with the Egyptian people during this period of mourning.
"Our efforts to defeat the monstrosity of Islamist extremism must not waver.
"The UK remains steadfast in its efforts to defeat Isil and in its work to bring about a political transition in Libya through the UN. We are clear that Libya must not become a safe haven for terrorists."
A Downing Street spokeswoman said the UK was "discussing with Egypt at the moment exactly what action they are taking" in Libya after airstrikes were launched by the country in response to the murder of 21 Egyptian Christians by Islamic State (IS).
The spokeswoman said the murder of Egyptian nationals by IS "underlines in Libya the importance of finding a political solution. The Prime Minister has appointed a special envoy on Libya to work with UN partners and representatives in Libya to work on a way forward on that".
"It is absolutely clear that what we need to be doing around the world is working with other countries to tackle this growing threat from Islamist extremists and their poisonous ideology wherever we find it," said the spokeswoman.
When asked whether Britain could offer Cairo military support, she said: "Our focus is on the political solution and there are no discussions beyond that at the moment in Government."
Pope Francis has denounced the slaying of Egyptian Copts in Libya by Islamic State (IS), saying they were "assassinated just for being Christian".
Francis spoke off-the-cuff during an audience with a Scottish ecumenical delegation.
He said: "They only said 'Jesus help me ...' The blood of our Christian brothers is testimony that cries out. Be they Catholic, Orthodox, Copts, Lutherans, it doesn't matter. They're Christian."
The killings have raised anxieties in Italy, given Libya's proximity just across the Mediterranean Sea and because one of the militants in the video said the group plans to "conquer Rome," the seat of Catholicism.