A former Taliban commander who served as the top recruiter for Islamic State’s affiliate in Afghanistan was killed Monday in the country’s southern Helmand province, officials said.

Mullah Abdul Rauf, a former detainee at Guantanamo Bay, was among several people killed in a drone strike, Reuters reported.

“Rauf and his men were . . . killed in a coalition airstrike this morning as they were traveling in a Toyota Corolla vehicle in Kajaki district,” said Mohammad Jan Rasoulyar, deputy governor of Helmand province, according to NBC News.

“The operation took place in close coordination with Afghan security forces,” he said.

There were conflicting accounts of the attack.

A Pentagon official told The Post that coalition forces executed the strike, killing eight enemies.

But Afghanistan’s intelligence agency, the National Directorate of Security, said the country’s army special forces killed Rauf and five others.

Local officials told NBC that NATO jets delivered the strike.

The others killed included Rauf’s brother-in-law and four Pakistanis, provincial police chief Nabi Jan Mullahkhel said.

US forces had captured Rauf in Afghanistan in December 2001 and held him at Guantanamo until 2007, when he was handed to Afghan authorities.

He was released from their custody in 2009.

Rauf was said to be a former Taliban commander who defected to Islamic State, or ISIS.

The Taliban is focused on recruiting in Afghanistan and Pakistan, where ISIS supporters are fewer, officials said.

The head of ISIS, meanwhile, was running scared as Jordan unleashed a barrage of airstrikes on the group in response to its execution of a Jordanian pilot, said the head of the country’s air force.

Abu Bakr al-Baghdadi “is frightened by what we did in the last three days,” Maj. Gen. Mansour al-Jabour told NBC. “[ISIS leaders] always hide, and they are always on the move, but we have assets always in the air for an opportunity to target al-Baghdadi and his gang.”

Jabour said his fighter jets had carried out 56 airstrikes in three days against ISIS in Syria, killing at least 7,000 militants, The Christian Times reported.

But a US official said that number was mistaken.

“It was not 7,000 killed over the weekend. I think the general meant 7,000 total killed since the beginning [of the air campaign],” the official told The Post.

“And 7,000 killed, that’s on the high end. There are around [20,000 to 30,000] ISIS troops currently. The general may have just screwed it up.”

With Post Wire Services