EL-ARISH, Egypt  — Islamic State militants ambushed a police convoy in Egypt’s Sinai Peninsula on Monday, killing 18 police and wounding seven others in one of the deadliest attacks this year in the restive region bordering Israel and the Gaza Strip.

Police and military officials said roadside bombs destroyed and set ablaze four armored vehicles and a fifth carrying signal-jamming equipment. The gunmen later opened fire with machine guns and commandeered a police pickup truck.

Among those killed were two police lieutenants. The wounded included a police brigadier general. The officials spoke on condition of anonymity because they were not authorized to brief media.

The Islamic State group claimed responsibility for the attack on its Aamaq news agency.

RELATED: Pope Francis calls Egypt attack on Christians, killing 28, “barbaric”

The attack took place about 19 miles west of el-Arish in northern Sinai, the epicenter of a long-running insurgency now led by an IS affiliate. The Interior Ministry, which oversees the police, issued a statement confirming the incident, but its account provided no details on casualty figures or how many vehicles were destroyed.

It said police traveling in the convoy fired at a car that rushed toward them, causing it to blow up and damage several of the convoy’s vehicles. That was followed by an exchange of gunfire with “terrorist elements” hiding in the desert on both sides of the road.

“That led to the martyrdom and wounding of some of the convoy’s personnel,” it cryptically added.

“Reinforcements were swiftly sent, the site has been sealed off and combing operations are underway,” it said.

Monday’s attack was the deadliest against security forces since July, when IS militants attacked a remote army outpost in the border town of Rafah, killing 23 soldiers. That was the deadliest attack in two years.

Over 100 Christian families fled the Sinai earlier this year, after seven Christians were killed in religiously-motivated attacks.

Before Egypt’s 2011 Arab Spring uprising, some 5,000 Christians lived in northern Sinai, but the number has since dwindled to fewer than 1,000, priests and residents say. Egypt does not keep official statistics on the number of Christians in cities or across the country.

In March, the military said militants killed 10 soldiers during an army raid in Sinai’s central region.

Egypt has battled militants in Sinai for years, but the insurgency became far more deadly after the 2013 military ouster of Mohammed Morsi, an elected Islamist president. It has since waged a number of high-profile attacks on the mainland, including areas near Egypt’s porous and desert border with Libya. Egypt maintains that militants attacking its security forces and minority Christians sneak into the country across the border with Libya carrying weapons.

In recent years there has also been a wave of attacks, mainly targeting security forces, blamed on splinter factions of Morsi’s Muslim Brotherhood group.

Monday’s attack came a day after authorities said they had busted a militant cell planning attacks in Cairo. Police said they killed 10 militants in two simultaneous raids on apartments in a densely populated Cairo neighborhood. They said the militants sneaked into the capital from northern Sinai, but did not say whether they were members of the IS group.

In April, Pope Francis visited Egypt in part to show his support for Christians in this Muslim majority Arab nation who have been increasingly targeted by Islamic militants. During the trip, Francis paid tribute to the victims of a December 2016 bombing at Cairo’s St. Peter’s church, located in close proximity to Cairo’s St. Mark’s cathedral, the seat of the Coptic Orthodox Church.

Following the pope’s visit, IS vowed to escalate attacks against Christians, urging Muslims to steer clear of Christian gatherings and Western embassies, saying they are targets for the group’s followers.

Egypt’s Copts, the Middle East’s largest Christian community, have repeatedly complained of discrimination, as well as outright attacks, at the hands of the country’s majority Muslim population. They account for about 10 percent of Egypt’s 93 million people.

Hendawi reported from Cairo. Associated Press writers Samy Magdy and Maamoun Youssef in Cairo contributed to this report. Crux staff contributed to this report.