Two shooters entered the school in the remote border town of Teri Mangal, less than one kilometre (0.6 miles) from the Afghan border in Kurram district, as teachers gathered exam papers that had been completed earlier in the day.
“When the two attackers went inside (the school), they identified Shiite people and separated them before opening fire,” Muhammad Imran, police chief for the district, told AFP.
The shooting occurred after news spread that a man from the Sunni Muslim community had died in hospital from wounds he suffered in an attack on his car earlier in the day, said Amir Nawaz, a senior local government official.
“The first incident took place at 11:30 am (06:30 GMT) and the second attack took place at 2:30 pm. These attacks were linked to sectarian violence,” Nawaz said, confirming the death toll in both attacks.
“Teachers were arranging and compiling the papers when the gunmen entered the school,” he added.
Zulfiqar Khan, a local health official, said a state of emergency had been declared at local hospitals.
The teachers’ bodies were carried out of the hospital in coffins and loaded into ambulances to be taken to burial sites, an AFP journalist saw.
Police said authorities were in talks with both religious communities to restore peace in the Shiite-majority Kurram district, which has a decades-long history of sectarian violence.
A jirga gathering — a tribal council of community elders responsible for settling disputes — was underway.
Religious tensions in the district stretch back over decades and have practically divided Kurram into two halves, Akhtar Ali Shah, a former provincial police chief, told AFP.
“There is (a) Shiite population on one side and a Sunni population on the other side. Even a minor incident can spark clashes, so caution is always needed,” he said.
Tensions have spiked over the past month, with four people killed in separate shootings, according to an intelligence official who asked not to be named.
Shiite Muslims make up roughly 20 percent of Pakistan’s population of more than 220 million.
Kurram is part of the former Federally Administered Tribal Areas (FATA), a semi-autonomous region in northwestern Pakistan that was merged with Khyber Pakhtunkhwa province in 2018, bringing it into the legal and administrative mainstream.