The explosion ripped through the busy madrassa in Peshawar's Dir Colony on Tuesday morning as a prominent religious scholar delivered a lecture on the teachings of Islam, according to police.
While officers had initially reported children were among those harmed in the blast they later revised their account, stating the students impacted were in their mid twenties.
Several are in a critical condition following the bombing, along with teachers and employees.
The nation’s president, Imran Khan, described the incident as a “cowardly barbaric attack” perpetrated by “terrorists”. So far no group has come forward to claim responsibility for the incident.
Officers believe at least 5 kilograms of explosives were placed inside the building moments before the incident.
"The blast took place in a madrassa where unknown people had planted explosives in a plastic bag," an officer said.
Dead and wounded students were taken to the nearby Lady Reading Hospital by ambulances and other vehicles as residents gathered outside to see if their loved ones had been harmed.
Student Mohammad Saqib, 24, said from his hospital bed the scholar Rahimullah Haqqani was explaining verses from the Quran before being interrupted by the explosion.
It was unclear if the teacher was among the wounded.
"Someone helped me and put me in an ambulance and I was brought to hospital," he said.
Another 24-year-old student, Saeed Ullah, said up to 500 people were present at the seminary's main hall at the time of the explosion. A hospital spokesperson said dozens of wounded people had been admitted, most of them students.
Pakistan’s Prime Minister Imran Khan tweeted his condolences to the families of victims, saying: “I want to assure my nation, we will ensure the terrorists responsible for this cowardly barbaric attack are brought to justice asap.”
The Pakistani Taliban have been targeting public places, schools, mosques and the military across the country since 2001, when this Islamic nation joined the US-led war on terror following the September 11 attacks in the United States.
Mohammad Khurasani, a spokesman for the Pakistani Taliban, condemned Tuesday's bombing. In a statement, he described the attack as a cowardly act, claiming that the country's institutions were behind it.
In another incident on Sunday, four people were killed in the explosion of an improvised device in Quetta, the capital of Pakistan’s southwestern state of Balochistan. On 21 October, another powerful explosion was reported in Karachi, the biggest city in Pakistan, where at least five people were killed and 20 were injured.
Last month, also in Khyber Pakhtunkhwa state, an explosion occurred in a market next to the Kabul River in Akbarpura where five people were killed and two were injured.
In 2014, militants from Tehreek-e-Taliban opened fire at a military school in Peshawar and killed over 150 people, including many children.
Additional reporting by agencies