Nine people, including a Canadian tourist, have been killed after gunmen launched a series of attacks in and around a medieval castle in Jordan.

Key points: A Canadian tourist, three other civilians and five police officers killed

A Canadian tourist, three other civilians and five police officers killed Ten hostages freed, some treated for injuries

Ten hostages freed, some treated for injuries Security forces have surrounded the medieval fortress

Police said five officers and four civilians were killed in several attacks in the southern Jordanian town of Karak, popular with tourists.

Loading

Earlier, at least 10 people, including foreign tourists, were rescued from the medieval fortress. Hospitals were treating several people who were injured.

Jordanian security forces said they had killed four "terrorist outlaws" after flushing them out of the castle where they had holed up after the shootout.

An official statement said the four assailants, who shot at police targets in the town before heading to the Crusader-era castle, carried automatic weapons.

Large quantities of explosives, weapons and suicide belts were seized in a hideout, it added.

The statement made no mention of their identity or whether they belonged to a militant group.

There was no immediate claim of responsibility for the attacks.

The shootings were the latest in a series of attacks that have challenged the pro-Western kingdom's claim to be an oasis of calm in a region threatened by Islamic extremists.

The chain of events began when a police patrol received reports of a house fire in the town of Qatraneh in the Karak district, according to a statement by Jordan's Public Security Directorate.

The officers responding to the call came under fire from inside the house, the statement added.

Two policemen were injured and the assailants fled in a car, it said.

In another attack, gunmen fired on a security patrol in Karak, causing no injuries.

Armed men also opened fire on a police station at Karak Castle, injuring members of the security forces.

Homegrown terrorist threat

The unidentified gunmen have reportedly taken refuge in the ancient castle. ( Wikipedia )

A former government minister from Karak city, Sameeh Maaytah, said there were signs Islamist militants may had been behind the attack but the Government had so far steered away from saying this.

Loading

Video footage on social media showed security forces taking groups of young Asian tourists up the castle's steep steps to its main entrance as gunshots were heard overhead.

Prime Minister Hani al Mulki told Parliament "a number of security personnel" had been killed.

Jordan faces homegrown extremism, with hundreds of Jordanians fighting alongside other Islamic State (IS) militants in Iraq and Syria and several thousand more supporting the extremist group in the kingdom.

Jordan is a key US ally, and a member of the US-led military coalition fighting IS.

Over the past year, gunmen have carried out several attacks on members of the Jordanian security forces and foreign trainers.

Earlier this year, Jordanian security forces engaged in a deadly shootout with suspected IS sympathisers in a northern Jordanian town.

In the most recent incident, three US military members were killed in a shooting outside an air base in southern Jordan in November. The three were in Jordan on a training mission, and came under fire while driving into the base.

AP/Reuters