AMMAN, Jordan (AP) -- A Jordanian policeman opened fire Monday on foreign trainers at a police training compound, killing two Americans and a South African before being shot dead, the government spokesman said.
The attacker also wounded two Americans and four Jordanians, one of them critically, said spokesman Mohammed Momani.
Authorities have launched an investigation into whether the motive for the shooting was personal or political, said Momani.
In this June 18, 2013, file photo, U.S. Marines monitor Eager Lion multinational military maneuvers in Quweira, 186 miles south of Amman, Jordan. The government-owned Al-Rai newspaper says a Jordanian policeman opened fire on American contractors at a police training center, killing two and injuring three. (AP Photo/Maya Alleruzzo, File)
A military official said the attacker was a police captain who worked as a trainer at the facility on the outskirts of the Jordanian capital, Amman. 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.
Jordan, a close U.S. 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 neighboring 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 told The Associated Press. In an earlier statement, he referred to the shooting as a crime.
In Washington, State Department spokesman John Kirby said U.S. officials were "in contact with the appropriate Jordanian authorities, who have offered their full support."
U.S. forces in Afghanistan have come under attack on a number of occasions by local police and troops serving alongside them, in what are known as "green-on-blue" assaults. Such attacks have been extremely rare in the Middle East.