Rebel gunmen killed a government militia commander and seven of his men in a raid on a mosque in Afghanistan's western state of Herat, state-run radio said Saturday.

Kabul Radio, in its English-language broadcast, said at least 22 were injured, including a member of the Iranian Consulate in Herat.Gunmen belonging to the Moslem resistance fighting the Soviet-backed government in Kabul stormed the Blue Mosque Friday and killed militia commander Zahim Ahmad and his men as they were praying, the radio said.

"Extremists launched an inhuman and criminal attack on the mosque and martyred eight people, including commander Zahim Ahmad, and wounded 22 people," said the radio, monitored in Islamabad.

Midia, the Pakistan-based news agency of the guerrillas' government-in-exile, confirmed rebel fighters had killed Ahmad and other "notorious Communists" but denied the attack occurred in the mosque.

"The mosque was not damaged. The ambush took place on a road north of the mosque," the agency said.

The U.S.-backed guerrillas have been fighting for 12 years to unseat the communist-style government in Kabul.