Sediq Azizi, spokesman for the provincial governor, said the blast took place during Friday prayers as dozens gathered in the mosque in Aybak, the provincial capital. He said the prayer leader of the mosque was in critical condition and was transferred to neighboring Balkh province for further treatment.
No one immediately claimed responsibility for the attack.
Separately, the Taliban's shadow governor for eastern Logar province and two deputies were killed in an airstrike, the Afghan Defense Ministry said in a statement. Afghan forces carried out the airstrike Thursday night in Charkh district, it said.
The Taliban made no immediate comment on the attack.
In eastern Ghazni province, Taliban attacked Afghan security checkpoints, killing four police officers, said Arif Noori, provincial governor's spokesman, AP reported.
Noori said three other forces were wounded and seven Taliban fighters were killed during Thursday night's battle in Dehyak district.
The Taliban have stepped up attacks across the country as Afghan president Ashraf Ghani visits neighboring Pakistan, where he has praised Pakistan's efforts to advance the peace process in the region. Ghani has reached out to Islamabad for help in bringing the Taliban to the negotiating table with the Kabul government.
Ghani's first visit to Pakistan since elections brought Prime Minister Imran Khan to power last year is also seen as an attempt by Ghani to reset the often-strained relationship between the two neighbors amid the stalled peace push with the Taliban.
The Taliban have refused to talk directly with Kabul, considering it a US puppet. The insurgents, however, say they will sit down with any Afghan, even a government official, but as an ordinary citizen and not as a government representative.