Jawed Basharat, spokesman for the provincial police, said that worshippers were waiting for food deliveries to break their Ramadan fast after finishing prayers when the bomb went off.
Provincial police chief Abdul Jabar Purdeli says that the explosives had been placed inside the mosque compound.
No group has claimed responsibility for the explosion.
Meanwhile, two improved explosive devices (IEDs) went off in Kabul in back-to-back blasts. No one was injured as a result of the explosions.
The violence comes after a July 12 suicide car bombing close to a U.S. base in southeastern Khost province killing 33 people.