A Jordanian policeman has opened fire on foreign trainers at a police compound in Amman, killing two Americans and a South African before being shot dead.

Two Americans and four Jordanians were wounded in the shooting at the police training centre on the outskirts of the Jordanian capital, government spokesman Mohammed Momani said.

He added that one of the wounded is in critical condition.

Mr Momani described the shooting as a crime and said an investigation has been launched.

The shooting raises questions about Jordan's image as an island of relative stability in a turbulent region.

The pro-Western kingdom has taken on a high-profile role in the fight against Islamic extremists, including the Islamic State group, which holds large areas in countries bordering Jordan.