A blast occurred in Jahdia seminary during afternoon prayers on Wednesday in Aybak city in Samangan.
According to local officials, the blast left 19 people dead and 23 others wounded.
"So far, 23 wounded have arrived and, unfortunately, 19 fatalities," said Sayed Osman Sayedi, deputy head of Samangan province.
The provincial department of Information and Culture confirmed the blast.
"This was not a suicide attack but a mine blast and was placed there," said Ferozuddin Munib, head of the provincial department of information and culture.
No one has yet claimed responsibility for the blast.
"It was around 1:00pm. We were praying when the blast happened," Mohammad, a victim wounded in the blast.