An Afghan official says Islamic State gunmen have attacked checkpoints in Nangarhar, killing three police in the group's first attack on security forces in the country.

Provincial government spokesman Ahmad Zia Abdulzai says another eight police were wounded in Sunday's attack in the Achin district, bordering Pakistan. He says Afghan airstrikes launched after the early morning attack killed 60 IS militants.

Until now IS loyalists in Afghanistan have only clashed with Taliban insurgents. The two are fighting for Islamic rule but are bitterly divided over strategy and leadership.

Abdulzai tells The Associated Press that IS militants "have a presence in three districts of Nangarhar, but this was their first attack on Afghan forces in the province."

A statement purportedly issued by an IS affiliate claimed a "big attack" in Nangarhar.