Three U.S. servicemembers were killed in a shootout Friday at the gates of an air base in southern Jordan, the military said, a U.S. official told Fox News.

It was not immediately clear what prompted the shooting.

The shots were fired as a car carrying the trainers tried to enter the al-Jafr base near the southern Jordanian town of Mann, said the military. A Jordanian officer was also wounded.

“Initial reports were that one (servicemember) was killed, two injured,” the official said. “The two injured servicemembers were transported to a hospital in Amman where they died.”

The U.S. Embassy in the Jordanian capital, Amman, said it had received reports about a security incident involving U.S. personnel and that it was in touch with Jordanian authorities.

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

Last November, a Jordanian police captain opened fire in an international police training facility, killing two Americans and three others. The government subsequently portrayed the police captain as troubled.

The United States has spent millions of dollars to help the kingdom fortify its borders. For the West, any sign of instability in Jordan, a key ally, would be of great concern.

The Associated Press contributed to this report