A floor of carpets is seen in the foreground as the sun sets at a Jordanian camp where U.S. servicemembers were training on May 16, 2015. The Pentagon announced Nov. 4, 2016, that three U.S. Special Forces soldiers were killed in a shooting incident at al-Jafr base, Jordan. According to reports Saturday, Nov. 12, the three were working for the CIA.

The three Army Special Forces soldiers killed at a Jordanian military base this month were working for a CIA program to train moderate Syrian fighters when they were shot at a checkpoint under still-unclear circumstances, U.S. officials said.

The Nov. 4 attack is thought to be the deadliest single incident involving a CIA team since December 2009, when seven officers and contractors were killed in a suicide bombing in Khost, Afghanistan.

The three soldiers - all members of the 5th Special Forces Group based at Fort Campbell, Kentucky - were killed by a Jordanian soldier at an entry control point to Prince Faisal Air Base near Jafr, in the southern desert about 150 miles south of the capital, Amman, according to the officials. The shooter also was wounded in what was described by U.S. and Middle Eastern sources as an exchange of gunfire.

The soldiers, identified as Staff Sgt. Matthew Lewellen, Staff Sgt. Kevin McEnroe and Staff Sgt. James Moriarty, were among roughly 2,000 U.S. troops working in Jordan while participating in the U.S.-led campaign fighting the Islamic State. Some of the troops have been assigned to mobile artillery units along the Jordanian border while others assist CIA-led training programs for Syrian opposition fighters.

The CIA declined to comment on the shooting incident or on the soldiers' possible role in agency programs.

What prompted the shooting remained unclear, as U.S. and Jordanian officials have painted different narratives of the incident.

The FBI is investigating the possibility of a terrorist attack, but it has not discounted the possibility that the deaths could have been the result of a mistake at the gate, said a U.S. defense official who, like others, spoke on the condition of anonymity because an investigation into the incident is ongoing.

But Jordanian investigators say the evidence so far points not to a deliberate attack but to a "chain of unfortunate events," according to a senior Middle Eastern security official briefed on the results of an internal Jordanian probe.

According to Jordanian accounts, the incident began with the accidental discharge of a weapon inside one of the Americans' Humvees as a small convoy was preparing to enter the base following a training exercise with Syrian opposition fighters, the Middle Eastern official said. In the ensuing confusion, shots were fired at U.S. personnel, some of whom got out of their vehicle to take cover.

"Security was heightened at the time," amping up the adrenaline among a guard force trained to respond rapidly to perceived threats, the official said. Investigators have found no evidence suggesting a deliberate targeting of the Americans, he said.

The incident took place five months after six Jordanian border guards were killed in a suicide-car bombing near the Syrian border. The Islamic State claimed responsibility for that attack. Last November, a Jordanian police officer shot and killed two American contractors and three others inside a police training center near Amman.

Jordan has reacted defensively in the past to allegations that its citizens deliberately targeted Americans. The moderate Sunni Arab country relies heavily on U.S. military and economic aid, and works closely with U.S. intelligence agencies, making it a prime target for Islamist extremist groups. Years of cooperation between Jordanian and U.S. intelligence services have yielded a string of counterterrorism successes but also occasional disasters, including the 2009 Khost bombing, in which a Jordanian intelligence officer also was killed.

The shooting in Jordan comes on the heels of the deaths of two CIA paramilitary officers killed in Afghanistan, according to U.S. officials. The five deaths mark a period of heavy loss for the clandestine organization and highlight the extent to which the United States - having sidelined much of its conventional forces in the fight against the Islamic State and other militant groups - increasingly relies on a combination of drones, special operators and CIA paramilitary forces to wage its wars around the globe.

The deaths of the three soldiers also provide a rare window into the CIA's practice of "detailing" U.S. troops and special operators for clandestine missions. The 5th Special Forces Group previously had been deployed to Jordan in 2013 to train members of the Pentagon's Syrian train-and-equip program, but the mission's scope was severely curbed in the past year as it failed to produce large numbers of trained fighters willing to take on only the Islamic State.

The CIA's program, on the other hand, allows its trainees to fight both Syrian government forces and the terrorist group.

There have been at least two previous instances of service members dying while working for the CIA since the Sept. 11, 2001, attacks. Sgt. 1st Class Nathan Ross Chapman was a Special Forces soldier detailed to the agency in 2002 when he was killed alongside CIA paramilitary officers in eastern Afghanistan, as was Marine Maj. Douglas Zembiec, who was killed during a shootout in Baghdad in 2007.

In both cases the men eventually were awarded stars on the CIA's memorial wall. Located in the front foyer at CIA headquarters, it tallies those who died serving the agency. It is unclear if the soldiers who died Nov. 4 will receive similar recognition; the CIA does not always release names that correspond with the stars on the wall.

---

The Washington Post's Adam Entous and Greg Miller contributed to this report.