The military operation that left four US commandos dead in Niger was actually a mission to capture or kill a militant leader, not a routine reconnaissance patrol as asserted by the Pentagon, ABC News reported Thursday.

The target of the October 3-4 overnight operation was a militant leader — known locally as Dandou — linked to the Islamic State and al-Qaeda, the network said, quoting senior Nigerien officials.

The chairman of the Joint Chiefs of Staff, General Joseph Dunford, told reporters last week the operation was a reconnaissance mission.

US intelligence sources told ABC the initial purpose of the operation was reconnaissance but it changed along the way, so the Americans stayed out longer — more than 24 hours — than originally planned for, ABC said.

“They should have been up and back in a day,” a senior US intelligence official told ABC. “But they were up there so long on a mission that morphed, they were spotted, surveilled and ultimately hit.”

The New York Times previously reported that the American troops on the reconnaissance mission were asked to back up a second clandestine operation by US, French and Nigerien commandos to capture or kill an Islamic State operative.

That raid was scotched because of bad weather, however, and the reconnaissance team already on the ground was asked to search for further evidence of the Islamic State militants.

Dunford said last week the unit of 12 American special forces soldiers and 30 Nigerien troops was returning from a village called Tongo Tongo when they were attacked by a group of some 50 fighters affiliated with the Islamic State group and equipped with small arms, grenades and trucks mounted with guns.

The US special forces did not call for reinforcements for an hour, which suggested they thought their unit could handle the attackers, Dunford said.

But a Nigerien official quoted by ABC said the Nigeriens asked for back up but the American side refused.

Five soldiers from Niger also died in the fighting.

The Pentagon declined comment on the ABC News report.

“Conducting a thorough investigation of this unfortunate event is the number one priority of the Department of Defense,” a spokeswoman said. “I will not comment further until we have a complete picture of what did or did not occur.”