A bomb exploded in a mosque where Afghans were registering for upcoming elections Wednesday, killing at least two people and injuring two more seriously, Afghan and U.N. officials said.

The U.S. military reported six dead, including two U.N. staffers. But the world body and the local governor said two people were killed, both Afghans.

The homemade bomb detonated early Wednesday in a mosque in Andar, a town 90 miles southwest of the capital, Kabul (search), as Afghans lined up for ID cards that will allow them to vote in Oct. 9 presidential elections.

"It was a very heavy explosion," said Gov. Asadullah Khan. "The mosque was completely destroyed, and lots of copies of the Holy Quran burned."

He blamed "enemies" of Afghanistan — shorthand among government officials for Taliban (search)-led militants who have condemned the country's first direct national election and threatened anyone talking part.

Khan said the two victims were an Afghan working for the country's joint U.N.-Afghan electoral body and another who had come to register. U.N. spokesman Manoel de Almeida e Silva confirmed his account.

Six other Afghans hoping to register were reported injured, two of them seriously.

Khan said the two badly wounded people were sent to Kabul for treatment. The U.S. military said they were at the main American base north of Kabul, which has a field hospital.

The military reported that four local Afghan nationals and two U.N. employees were killed. It said it was unclear if the U.N. workers were foreigners. Efforts to reach the American military spokesman by phone were not immediately successful.

The blast brought to at least nine the number of election workers killed in a string of attacks this year. The U.S. military expected the violence to increase ahead of the Oct. 9 vote.