KABUL, Afghanistan — The American military has intensified its airstrikes in Afghanistan in recent weeks, expanding them to include a bombing campaign against Islamic State militants who defeated the Taliban in fighting over a sliver of territory in the eastern part of the country.

Throughout June, American drones and warplanes fired against militants in Afghanistan more than twice as much as they had in any previous month this year, according to military statistics.

The increase in the use of American air power comes more than six months after President Obama declared that the American combat mission in Afghanistan had ended. The vast majority of the strikes appear to remain focused on Taliban forces, the traditional targets of American airstrikes here for more than a decade. But several have targeted insurgent commanders who defected from the Taliban to swear allegiance to the Islamic State, also known as ISIS or ISIL.

American officials have said that the strikes against the Islamic State were part of a defensive policy to protect the coalition forces from harm. But Afghan officials said the strikes against Islamic State targets came partly at the urging of the Afghan domestic intelligence service, which thought it was time to remove them or risk the Islamic State’s gaining a foothold in eastern Afghanistan.