Two Americans among five dead as officer opens fire on police trainers
A Jordanian officer shot dead two US government security contractors, a South African trainer and two Jordanians, at a US-funded police training facility near the capital, Amman.
The gunman was then killed by security forces responding to the emergency.
US President Barack Obama said he was treating the attack, at the King Abdullah Training Centre in Amman - in which four Jordanians and one Lebanese citizen were wounded - very seriously and that a full investigation was under way.
The gunman, a police captain, was a co-trainer.
Jordanian officials said he had no known terrorist links, but the attack took place on the 10th anniversary of Jordan's deadliest terrorist act, when al-Qa'ida bombs at three hotels in Amman killed 60 people.
The US Embassy in Amman said two American civilian security contractors and a South African contractor were shot dead, and one of the slain Jordanians was a translator, according to the Jordanian government.
It was "premature to speculate on motive at this point" with the investigation proceeding, it said.
The two Americans were working for the US State Department's International Narcotics and Law Enforcement Affairs Bureau training Palestinian security forces.
Mr Obama said: "The fact that someone dressed in military uniform and carried out an attack at a training facility in (Jordan) ... we take this very seriously, and we'll be working closely with the Jordanians to determine exactly what happened."
Security sources said several earlier militant plots to attack the King Abdullah training centre had been foiled.
Jordanian government spokesman Mohammad Momani said the attacker was gunned down by Jordanian security forces.
The training facility was set up on the outskirts of Amman after the 2003 US invasion of Iraq to help rebuild the shattered country's post-war security forces and to train Palestinian Authority police officers.
Jordan hosts several hundred US contractors, who are part of a military programme to bolster the kingdom's defences, including the stationing of F16 fighter jets that use Jordanian airfields to hit Islamic State (Isil) positions in neighbouring Syria.
But Jordan's role in the war against Isil has raised disquiet among some Jordanians about instability at their borders.
They fear that Amman's enhanced role in the campaign might provoke Islamist bloodshed in their country.