The Pentagon confirmed Tuesday that a U.S. military drone strike killed a former Guantanamo Bay prisoner who had been accused of serving as a recruiter for the Islamic State in Afghanistan.

Abdul Rauf, 34, who was released from the prison at Guantanamo in 2007, died along with seven other suspected militants who were targeted in the airstrike Monday, according to Rear Adm. John Kirby, the Pentagon press secretary.

U.S. military officials have said that the Islamic State — a radical group based in Iraq and Syria — has a marginal presence in Afghanistan but has been looking to expand its influence. Rauf was a former Taliban commander who fell out with that group and swore allegiance to the Islamic State “probably no more than a couple of weeks ago,” Kirby told reporters.

Kirby described the Islamic State’s reach in Afghanistan as “nascent and aspirational” and said Rauf had few followers. But he said Rauf and the others killed in the airstrike were targeted because they had been planning attacks against U.S. and Afghan forces.

The U.S. military and its NATO allies formally ended combat operations in Afghanistan on Dec. 31. Although about 10,600 U.S. troops remain in the country, they are primarily deployed to train Afghan security forces and provide arms-length support for the fight against the Taliban.

At the same time, U.S. officials have said that they will continue to launch counterterrorism operations and that they will attack Taliban fighters if they directly threaten U.S. or Afghan personnel. Kirby said that was the case with Rauf, although he did not provide specifics.

“If they’re going to threaten our interests, our allies, our partners in Afghanistan, they’re fair game,” Kirby said.

Rauf was released from Guantanamo after spending about five years in the military prison.