Jordanian security forces have freed tourists trapped inside a medieval castle after storming the building where armed men had taken shelter following a shoot-out with police that killed at least nine people, security sources say.
A Canadian woman, three other civilians and five police officers were among the nine killed during the exchange of gunfire between the assailants and security forces on Sunday.
At least 29 people were taken to hospital, some with serious injuries, the sources said.
Police in the mountainous city of Karak had earlier freed 10 people, including foreign tourists, but some were still being held in the Crusader-era castle from where the gunmen shot at security forces who were surrounding it, a security source said.
Prime Minister Hani al Mulki told parliament "a number of security personnel" had been killed and that security forces were laying siege to the castle.
Police said gunmen shot at officers patrolling the city before entering the castle, perched on top of a hill.
The identity of the assailants was not immediately clear.
Jordan is one of the few Arab states that have taken part in a US-led air campaign against Islamic State militants holding territory in Syria.
But many Jordanians oppose their country's involvement, saying it had killed fellow Muslims and raised security threats inside Jordan.
Officials worry about radical Islam's growing profile in Jordan and support in impoverished areas for militant groups.