Jordanian security forces say they have killed four gunmen after flushing them out of a medieval 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.
It is not clear if all the fatalities took place at the castle, which is one of the country's most popular tourist attractions.
Footage on social media purportedly from the scene showed armed police moving into the sprawling castle complex and helping tourists when shots rang out and they were forced to retreat.
US tourist Avinash Cavale told the BBC he and his wife were arriving by car at the castle when gunfire broke out.
"We were about 20m from the castle gate when we started hearing gunfire. There were a lot of different types of firing coming from different directions," he said.
"We were still in the vehicle and just about to get out, so we closed the doors and local folks were yelling at us to get out. The street was very narrow but we reversed down."
Jordan is a close ally of the US and a member of the US-led coalition fighting the so-called Islamic State (IS) group in Syria and Iraq.
US forces have trained a small group of Syrian rebels in Jordan as well as Iraqi and Palestinian security forces.
IS has previously threatened to "break down" Jordan's borders.
In June the group said it was behind a suicide truck-bomb attack that killed six security personnel on the border with Syria.
- BBC / Reuters