Gunmen killed 10 people including a Canadian tourist and police officers on Sunday in southern Jordan where security forces were hunting down the unidentified attackers.
The shootings took place in Karak, a tourist destination known for one of the biggest Crusader castles in the region, around 120 kilometres (70 miles) south of the capital Amman.
Jordan\’s general security department said seven policemen, a female Canadian tourist and two Jordanian civilians were killed in a series of shootings.
It said that 27 others, including policemen and civilians, were wounded.
A separate police statement said that "a number of outlaws who committed ugly crimes this afternoon" had been killed and that security forces were combing the Crusader castle for more gunmen.
The first attack took place when a police patrol went to check on a fire that had broken out in a house in Karak, the general security department said.
"As soon as they reached the area, unknown gunmen who were inside the house opened fire on the patrol, wounding a policeman, and then fled by car," it said in a statement carried by the official Petra news agency.
"Shortly afterwards, gunmen opened fire on another patrol without causing any casualties," it added.
At the same time, gunmen in the Crusader castle opened fire on the Karak police station, "wounding several policemen and passers-by" who were rushed to hospital.
"Police and security forces have surrounded the castle and its vicinity and launched an operation to hunt down the gunmen," the statement said, adding that the search was still under way.
A senior security source said some people were trapped in a lower floor of the citadel when the gunmen took shelter there, but denied media reports that they were being held hostage.
"There are no hostages. But some people who were on a lower floor were afraid of leaving as the gunmen traded fire with the security forces," said the source who did not wish to be identified.
He said that the gunmen were on a higher level inside the fortress.
The Jordan Tourism Board described the Karak citadel, which dates back to the 12th century and has withstood many sieges, as a "maze of stone-vaulted halls and endless passageways".
The general security department statement said "five or six gunmen" were thought to be involved in the shootings.
However, Prime Minister Hani al-Malki, who was addressing parliament at the time of the shootings, said that "special forces and policemen are surrounding 10 gunmen holed up inside the Karak citadel".
It was not immediately clear who was behind the shootings, but Jordan has been hit by Islamist attacks in the past.
Jordan is a leading member of the US-led coalition fighting the Islamic State group in neighbouring Iraq and Syria.
It has carried out air strikes targeting IS, and also hosts coalition troops on its territory.
Maaz al-Kassasbeh, a Jordanian fighter pilot, was captured by the jihadists when his plane went down in Syria in December 2014, and he was later burned alive in a cage.
Karak is Kassasbeh\’s home town.
In June, a suicide bombing claimed by IS killed seven border guards near the Syrian frontier.
According to sources close to Islamists, almost 4,000 Jordanians have joined jihadist groups in Iraq and Syria, and an estimated 420 have been killed since 2011.