U.S. and allied forces have faced increasing insider attacks in recent years. In November, Brent Taylor, the mayor of North Ogden, Utah, and a major in the Utah National Guard, was killed by an Afghan soldier in Kabul.
The last six months have seen the Taliban carry out near-daily attacks, mainly targeting Afghan security forces.
The insurgent group effectively controls around half the country.
The Taliban have rejected calls for a cease-fire even as they hold talks with the U.S. aimed at ending the 18-year war, America’s longest.
IS, meanwhile, has launched attacks targeting security forces as well as minority Shiites.
The U.S. has lost more than 2,400 soldiers in its longest war, and has spent more than $900 billion on everything from military operations to the construction of roads, bridges and power plants.