IRBID, Jordan (AP) — Seven men killed in armed clashes with Jordanian special forces had ties to the Islamic State extremist group and had planned attacks on military and civilian targets in the kingdom, the country's intelligence service said Wednesday.

The deadly confrontations, sparked by an arrest raid, took place late Tuesday in the northern city of Irbid. The men killed in the raid wore explosives belts, and weapons and explosives were found at the scene, according to the intelligence agency.

The agency did not elaborate on the fugitives' ties to IS or provide details about their alleged plans. However, the night-time operation in downtown Irbid, accompanied by the sound of explosions and gunfire, underscored the potential threat to Jordan by extremists.

The pro-Western kingdom is part of a U.S.-led military coalition against IS in neighboring Syria and Iraq. Security forces have also cracked down on suspected IS sympathizers in Jordan. Some of those expressing support for the group on social media have been sent to prison by military courts.

In the Irbid raid, troops tracked suspected militants to a residential building near the city center, surrounded it and opened fire with automatic weapons when the suspects refused to surrender, the intelligence agency said.

A Jordanian officer was killed in the clashes, along with the seven wanted men. The intelligence service said 13 suspects linked to the group had been arrested in Irbid in previous raids, but did not say when those took place.

"I heard an exchange of fire and the sound of helicopters flying above our house," area resident Ahmed al-Jamrah said of the raid. "We couldn't sleep because of the shooting and the loud explosions."

Jordanian Prime Minister Abdullah Ensour told parliament that the operation ended at 3 a.m. Wednesday. He said that extremists "are trying to reach our country which is stronger and more solid than they think."

In downtown Irbid, security forces on Wednesday sealed off the area around the three-story residential building where the fugitives had been holed up. The facade was blackened.

Irbid Mayor Hussein Bani Hani said followers of a hard-line stream of Islam have become increasingly active in the city in the past two years. They were suspected, among other things, of vandalizing cemeteries because they believe graves should not be marked, he said.

"Security measures were beefed up in the city of Irbid since then," he said.

Fayez Dweiri, a retired major general in the Jordanian military, said Jordanians who returned home after fighting alongside IS and other militant groups in Syria and Iraq also pose a potential security risk.

"Our security agencies should be cautious with them as their return might not be to show repentance," he said, adding that he did not have details about the Irbid operation.

___

Associated Press writer Khetam Malkawi in Amman, Jordan, contributed to this report.