Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Three U.S. service members were killed in Jordan on Friday after their vehicles were involved in an exchange of gunfire at the gates of a military training facility, two American officials told NBC News.

The trio were in vehicles approaching Prince Faisal Airbase when they came under small-arms fire, a U.S. military official and a U.S. official said on condition of anonymity.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

Initial reports said that one was killed and two injured, but the two wounded Americans later died in hospital, the officials added.

Jimmy Moriarty, 27, was one of three U.S. servicemen killed in Jordan. Courtesy of family

The three staff sergeants were identified as James Moriarty, 27, Matthew Lewellen, 27, and Kevin McEnroe, 30. The soldiers were assigned to the 5th Special Forces Group (Airborne) and were in Jordan supporting Operation Inherent Resolve.

According to Wayne Dolcefino, a spokesman for the Moriarty family, the Jordanian military is claiming the shooting was an accident. But the Moriarty family says it wants more answers.

The Pentagon released a statement Friday that it is "working closely with the government of Jordan to determine exactly what happened. Our thoughts and prayers are with the loved ones of these service members. We will provide more information as appropriate."

Jordan is a key U.S. ally and is participating in the American-led coalition fighting to defeat ISIS. The kingdom has deployed troops, launched airstrikes on ISIS targets and also hosts F-16 fighter jets in the area to strike the terror group.

But Jordan’s role in the war against ISIS has disquieted some Jordanians about instability on their borders, Reuters reported.

The incident follows a shooting just over a year ago when a Jordanian police officer gunned down two American contractors and their South African colleague at a U.S.-funded police training center in Amman.