Taliban militants dragged a school teacher out of a mosque in Afghanistan and cut off his ears as a "punishment" for working for the government, an education official said.

The rebels took another dozen people, most of them elderly men, out of the mosque in the southern province of Zabul and beat them up on similar charges, provincial education chief Mohammad Nabi Khushal said Sunday.

The men had burst into the mosque while dozens of worshippers were in a late night prayer session Saturday and singled out primary school teacher Bismillah Khan, Khushal said, blaming Taliban rebels.

"They took him out of the mosque and cut off his ears. They said, ''Anyone working for the government will be punished like this''," he said.

The teacher, who worked at a refurbished school re-opened five months ago, was on Sunday admitted to a US military-run medical facility in the area for treatment, he said.

A villager who refused to be identified confirmed the incident to AFP by telephone. The rebels had introduced themselves as members of Taliban militant group, he said.