More than 20 people were also wounded in the explosion at a religious school in the ancient provincial capital of Aybak.