Updated

The U.S. military believes someone in a Niger village may have tipped off attackers to the presence of U.S. commandos and Nigerien forces in the area, setting in motion the ambush that killed four Americans, a senior defense official says.

The official said Tuesday that the Army Green Berets and about 30 Nigerien forces stopped in a village for an hour or two to get food and water after conducting an overnight reconnaissance mission. After they left, they were ambushed by about 50 heavily armed enemy fighters, who also killed four Nigerien fighters and wounded two Americans and several Nigerien troops.

Details about the attack and the events leading up to it have been murky, trickling out over the last three weeks. According to the official, the joint U.S. and Niger patrol was asked to help a second American commando team that had been hunting for a senior member of al-Qaida in the Islamic Maghreb believed to be in the area.

The official wasn't authorized to discuss the incident publicly so spoke on condition of anonymity.

The joint U.S.-Niger team was initially sent on a routine mission to meet local tribal leaders and work with the Niger forces. But after they had set out on Oct. 3, they received a new assignment, the official said. They were asked to go to a location where the insurgent had last been seen, and collect intelligence. Because the insurgent was no longer in that area, military commanders believed the operation wasn't risky, the official said, adding there was no order to search for or find the AQIM member.

Under the rules, U.S. troops in Niger can accompany local forces on missions when "the chances of enemy contact are unlikely." The official said the decision to change the joint team's mission may have met those rules because the AQIM insurgent was no longer there, but those are some of the questions the ongoing investigations will answer.

U.S. military officials believe the intelligence mission went well during the night. But on their way back to their base in the morning, the U.S. and Niger troops stopped at a village about 85 kilometers (50 miles) north of Niger's capital, Niamey.

After getting supplies and meeting with tribal leaders, the joint patrol left the village. It is at that point, the official said, that the U.S. believes someone in the village alerted the IS-linked militants that American and Niger forces were in the area.

The joint team was attacked about 200 kilometers (120 miles) north of Niamey, by what officials believe was a relatively new offshoot of the Islamic State group that calls itself Islamic State in the Sahel. That group is not believed to be connected to the AQIM leader that the other American special forces team has been looking for.

The enemy fighters attacked on motorcycles, carrying rocket-propelled grenades and heavy machine guns, setting off a long and complex battle.

Marine Gen. Joseph Dunford, chairman of the Joint Chiefs of Staff, told reporters Monday the U.S. special forces unit didn't call for help until an hour into their first contact with the enemy. And he acknowledged that many questions linger about the assault.

Those questions, said the defense official, will include who authorized the decision to change the team's mission, as well as why it took so long to evacuate the wounded and why one of the killed U.S. soldiers was missing for two days before his body was recovered.

Asked Tuesday about the decision to give the team another mission, Dunford declined to provide any details, saying those are the questions the investigation will answer. He added that once the investigation is complete, U.S. military officials will first meet with the families of the fallen soldiers and tell them what happened, and then release the information publicly.

Speaking at the close of a daylong conference of defense chiefs from around the world, Dunford said that small numbers of Islamic State insurgents have been trying to recruit local fighters in places like Niger. Those fighters often rebrand themselves as IS. But he said the U.S. has not seen any significant numbers of IS insurgents outside of Iraq and Syria.