A Jordanian policeman opened fire on foreign trainers at a police compound, killing two Americans, a South African and a Jordanian before being shot dead, a government spokesman has said.
The attacker also wounded two Americans and three Jordanians, said spokesman Mohammed Momani.
Authorities have launched an investigation into whether the motive for the shooting was personal or political, said Momani.
The US embassy in Amman confirmed that two US government employees were killed and two wounded in the incident.
A statement said: “Our heartfelt condolences go out to the families of all of the victims. The investigation is ongoing and it is premature to speculate on motive at this point. We are working closely with the government of Jordan and local security services on a full and comprehensive investigation.
“We strongly condemn this incident and we deeply appreciate the co-operation and support received from our Jordanian partners.”
A military official said the attacker was a police captain who worked as a trainer at the facility.
The captain was married and had two children, said the official, who spoke on condition of anonymity because the government has not released the assailant’s identity.
A US official said the Americans who were killed and wounded in the attack were part of a State Department police training programme. The official said all were civilians, but declined to identify them.
Momani said the Jordanian killed in the attack was a civilian employee at the centre.
About two hours after the shooting, dozens of armoured vehicles were moving in and out of the large, walled training centre on the outskirts of Amman. The facility was established in 2003, and has trained 53,000 police officers from Iraq, 8,000 from the Palestinian territories and additional groups from other Arab countries, according to its website.
Jordan, a close US ally that has a peace treaty with Israel, has long been seen as an island of relative stability in a turbulent region.
Over the past year, the pro-Western kingdom has taken on a high-profile role in the fight against extremists, including the Islamic State group, which controls large areas of neighbouring Iraq and Syria. There has been concern that militants could carry out revenge attacks on Jordanian soil.
“We have full confidence in our security measures, and the investigation will uncover the motivation behind what happened,” Momani said. In an earlier statement, he referred to the shooting as a crime.