CAIRO — Egypt was hit by its deadliest ever militant attack on Friday, when gunmen opened fire and set off explosives at a mosque in the northern Sinai Peninsula, killing more than 200 people.

Egypt has been battling an insurgency in the Sinai led by an affiliate of the Islamic State group that intensified after the military’s 2013 ouster of the Muslim Brotherhood from power. Hundreds have been killed in what has become a grinding stalemate in Sinai. The militants have expanded their attacks to other parts of Egypt, carrying out deadly bombings of churches to terrorize the Christian minority and deadly gunbattles with security forces.

A generation earlier in the 1990s, Egypt faced a campaign of violence by Islamic militants largely based in the south of the country. The militants attacked Christians and security forces and sought to undermine Egypt’s economy by striking tourists. It took years but the government was able to crush it with a heavy-handed crackdown that entrenched the long-term power of security agencies in the country. Some of the campaign’s militant leaders, from Islamic Jihad and the Gamaa Islamiya, would later be prominent in al-Qaida.

Here is a look at some of the deadliest attacks seen in Egypt.

HATSEPSUT’S TEMPLE:

In November 1997, gunmen opened fire on tourists, killing 62 people, at the Temple of Hatshepsut in the southern city of Luxor, site of many of the country’s most dramatic and popular pharaonic monuments. It was the deadliest attack of the 1990s insurgency.


SINAI ATTACKS:

In the mid-2000’s, newly formed Sinai militant groups carried out a series of bombings against beach resorts. A suicide truck bomber hit a Hilton in Taba on the border with Israel in October 2004, and near simultaneous bombings hit two other Sinai resorts, killing a total of 34 people, mostly Egyptians and Israelis.

In July 2005, bombings hit multiple sites including a hotel in Sharm el-Sheikh, the biggest of Egypt’s Sinai resorts, killing 88 people. The following April, bombs detonated at several locations in Dahab, killing 23 people.


NEW YEAR’S CHURCH BOMBING

A bomb explodes at the al-Qadeeseen Coptic Christian Church, hitting worshippers as they leave a midnight Mass on New Year’s 2011, killing more than 20 people in the Mediterranean coastal city of Alexandria. No suspects have ever been named and the crime is still unsolved.


METROJET FLIGHT 9268

A Russian Metrojet passenger airline crashes in Sinai after taking off from Sharm el-Sheikh in October 2015, killing more than 220 people on board, mostly Russian tourists. The Sinai affiliate of the Islamic State group said it blew up the plane with a bomb smuggled on board, and Russia said the aircraft was likely downed by explosives.


ATTACKS ON CHRISTIANS

IS-linked militants have carried out multiple attacks on Egypt’s Christian minority. In December 2016, a bombing at a chapel adjacent to Egypt’s main Coptic Christian cathedral in Cairo killed 30 people and wounded dozens during Sunday Mass.

In April 2017: Suicide bombers hit two churches in the coastal city of Alexandria and the Nile Delta city of Tanta during services for Palm Sunday, killing at least 43 people and wounding dozens. The next month, masked militants killed 28 people when they opened fire on a bus packed with Coptic Christians, including children, heading to the remote monastery of St. Samuel the Confessor near the southern town Maghagha.


ATTACKS ON SECURITY FORCES

The IS affiliate has also succeeded in striking heavy and embarrassing blows on Egypt’s police and military. In July 2014, gunmen armed with rocket-propelled grenades attacked a post in Egypt’s western desert near the Libyan border, killing 21 soldiers. In Sinai only a few months later in October, the IS affiliate struck military checkpoints with surprise attacks that killed more than 30.

In July this year, gunmen and a suicide bomber attacked a military checkpoint in northern Sinai, killing 23 soldiers.