Egypt signed agreements to purchase 24 advanced fighter jets from France on Monday, hours after Egyptian aircraft bombed Islamic State targets in Libya and implored foreign governments for help fighting extremists in the region.

The deal for 24 of Dassault Aviation's multi-role Rafale aircraft as well as a frigate and munitions, underlines how many are willing to overlook Egypt's poor human rights record when it comes to weapons sales as Cairo emerges as a key player in the fight against the Islamic State group.

At a ceremony in the gilded Presidential Palace in the Egyptian capital, French business executives including Dassault CEO Eric Trappier signed the agreements with Egyptian generals, shaking hands and kissing each other's cheeks.

Egyptian Defense Minister Gen. Sedki Sobhi said the weapons would help Egypt boost security and fight terrorism.

"Without a doubt, the stability and security of Egypt are an essential base for the stability and security of countries of the Mediterranean, as well as countries of the European Union and above all, your country, which has been confronted in recent months by terrorist acts," Sobhi said, referring to last month's deadly attack on a Paris satirical magazine.

Monday's Egyptian airstrikes in Libya were a swift retribution for extremists' beheadings of Egyptian Christian hostages, shown in a grisly online video released hours earlier. Libya's air force commander said the strikes were coordinated and killed some 50 militants, while two Libyan security officials said civilians, including three children and two women, were among the casualties. The officials spoke on condition of anonymity because they were not authorized to speak to the media.

Libya, Egypt's western neighbor, has slid into chaos since the 2011 uprising that toppled and killed longtime dictator Moammar Gadhafi.

French Defense Minister Jean-Yves Le Drian condemned the killing of the Egyptian hostages in Libya, calling the Rafale deal "the beginning of reinforced cooperation to serve regional security."

"These events show that the threats are accumulating, and we are measuring their severity every day. To confront these threats we need allies," he said. "Today our two countries are leading a common combat against terrorism."

U.S. ally Egypt, which has for decades received up to $1.3 billion annually in military aid from Washington, is seeking to diversify its arms providers. Its military remains largely U.S.-trained and equipped, although Russian news agency Interfax reported last week that Moscow has $3.5 billion in new contracts with Cairo for military aircraft, air defense missiles and other weapons.

Washington had withheld some of its aid after the Egyptian army ousted a freely elected Islamist president in 2013, but has for example released a delivery of Apache helicopters last year.

Ben Moores, senior defense analyst at IHS Jane's in London, said the new Rafale aircraft will significantly improve Egypt's ability to drop advanced munitions on targets with precision, compared to its current workhorse jet, an older variant of the American F-16.

"This gives them a much better strike capability, because the targeting system is much better than what their existing aircraft have," Moores said. "Probably the biggest difference is that it comes with advanced radar, which is effectively like moving from analog to digital."

"With this platform, they're going to get access to a lot of precision guided weaponry ... they'll be able to drop bombs on very particular targets with much lower collateral damage, and that makes a massive difference when dealing with public scrutiny."

A French Defense Ministry official, speaking on condition of anonymity because of ministry protocol, has said the total value of Monday's sale was 5.2 billion euros ($5.93 billion).

Besides extremists in Libya, Egypt currently faces a militant insurgency in the restive Sinai Peninsula, and is weighing intervention in Yemen if Shiite rebels there threaten shipping lanes in the strategic Red Sea via the Suez Canal.

"Now they'll be able to strike all over Libya and potentially Yemen as well," Moores said. "And that will be crucial because both those places are turning into failed states where extremists can set up shop easily."

___

Follow Brian Rohan on Twitter at www.twitter.com/brian_rohan