Jordanian security forces say they have killed four gunmen after flushing them out of a historic hilltop castle in the city of Karak.

The gunmen had fled to the castle after a shooting spree that left 10 people dead including a tourist from Canada and at least four police officers.

Police said suicide belts and weapons had been seized at a hideout used by the “terrorist outlaws.”

However, it was not clear if the men belonged to any militant group.

Earlier, the gunmen had opened fire on two police patrols before fleeing to the castle and attacking a police station there, officials said. Several tourists were trapped in the castle but were freed as security forces moved in.

At least 27 people have been wounded, some seriously.

Jordanian officials said events began earlier in the day with a shoot-out between police and armed men at a house near Karak. The gunmen then fled by car into the city.

The security directorate said gunmen had also shot at a security patrol before they reached the castle. Once inside they opened fire on a police station.