An Afghan official says fighters for the Islamic State group and a militia controlled by a prominent lawmaker have beheaded a total of eight men in tit-for-tat revenge killings in the eastern border province of Nangarhar.

Ghalib Mujahid, governor of the Achin district, said on Sunday that four men from each side had been decapitated after being caught by the opposing side during battles on Saturday.

During a fight with gunmen affiliated with the IS, he says, four members of a militia loyal to Zahir Qadir, deputy speaker of parliament, were taken hostage and beheaded.

In revenge, four of five IS gunmen held by Qadir's militia were beheaded, he says. Their heads were placed on stones along a main road through Achin, he says.