Four armed men killed five police and four civilians, including a Canadian woman, in the Jordanian city of Karak. The group, which had suicide belts and a stash of explosives in a hideout, was neutralized after holing up in a medieval Crusader-era castle.

The security forces said in a statement that the manhunt ended with them killing four gunmen in a shootout outside the castle.

Reuters reported that a Canadian woman was among the dead, citing police. The Canadian government confirmed the death of one of its citizens.According to Al Ghad, two civilians died from their injuries in the hospital.

At least 29 people were taken to hospital, Reuters reported.

The ancient site is one of the country's most popular tourist attractions.

Watch Jordanian police storm Crusader castle amid hostage crisis:

The authorities did not provide any information about whether the suspects were members of any terrorist or militant group. Police, however, said that the hostage-takers came from the town of Qatraneh, some 30km northeast of the site. The town has a reputation for smuggling and is known for being a home for militant tribal groups fighting against the government.

At least fourteen people, including a tourist from Malaysia, were among the hostages, local media said, adding that security forces have managed to free some of them.

Around 10 tourists who had been on a tour of the historic site and trapped inside when the gunmen went into the castle were rescued, Reuters reported, citing police. Occasional gunfire was heard in the castle area, witnesses said.

A foreign tourist and other civilians were among those killed in the Sunday afternoon shootout, local Al Ghad newspaper reported. Four policemen also died and a number of bystanders were wounded, some seriously, it added.

لحظة تدخل قوات الأمن برفقة عدد من الأهالي لانقاذ الرهائن من المدنيين المحتجزين من قبل مسلحين في قلعة #الكرك#الاردنpic.twitter.com/K58O77HG4x — حسينة اوشان (@hassinaouch) December 18, 2016

Unidentified gunmen in cars opened fire on security forces in the area where the 12th century Karak Crusader castle, one of the largest in the eastern Mediterranean, is located.

Jordan’s prime minister, Hani al Mulki, said that “a number of security personnel” had been killed, adding that several militants are holed up in the castle, which is now under siege by security forces.

There have been unconfirmed reports on Twitter saying that Islamic State (IS, formerly ISIS/ISIL) is celebrating the news, claiming at least 20 casualties. However, the affiliation of the attackers has not been yet confirmed.