January 20, 2016 12:04 PM EST

Zia Ur Rehman was among the lucky ones. A computer-science lecturer at Bacha Khan University in the northwestern Pakistani city of Charsadda, about 21 miles from Peshawar, he had come to work early Wednesday to print out the results of a recent set of examinations. His students were due to receive their grades later on Wednesday.

As the printer coughed out the grades, Rehman, 30, heard the crackle of gunshots coming from the direction of a nearby boys’ dormitory. When he rushed out to see what was happening, he was greeted by gunfire: an armed militant, one of four, emerged from the thick fog that had blanketed the campus, his weapon pointing in the direction of Rehman and one of his departmental colleagues. The two men fell to the ground to escape the firing. “Then we hid in the nearby washrooms,” Rehman tells TIME.

They were there for the remainder of the morning, during which time the gunmen killed at least 20 people and wounded dozens in a brutal attack that recalled a gruesome siege on a Peshawar school in December 2014, when more than 150 students and teachers were gunned down by Taliban militants.

The militants who attacked the Bacha Khan campus were killed following a gun battle with local security forces, who said they had concluded operations to clear the campus six hours after the attack began. Security guards, students and at least one university professor were reported to be among the dead.

Claiming responsibility for the attack in a phone call to the Associated Press, a senior Pakistani Taliban commander said the assault on the university was in revenge for a recent Pakistani military offensive against Islamist militants in the country’s restive border region with Afghanistan. Although a spokesman for the main Pakistani Taliban faction later disowned the attack as “un-Islamic,” it underlined the strength of the long-running insurgency in Pakistan’s northwest, despite the recent terrorism crackdown. A day before the attack in Charsadda, a suicide bomber struck a crowded security checkpoint in the outskirts of Peshawar, killing at least 11 people, including two children. In another recent attack, at least 26 people died in late December, when a suspected suicide bomb went off near an administrative office in the northwestern Pakistani town of Mardan.

Pakistan’s Prime Minister, Nawaz Sharif, pledged “a ruthless response by the state” to the assault on the Bacha Khan campus. “Cowards and their financers will see our national resolve to eliminate terror from the country,” he said in a statement issued from Switzerland, where he is attending the annual World Economic Forum meeting in Davos. “The entire nation is united and one against terrorism.”

According to multiple reports, the militants used the thick fog on Wednesday morning as a cover to scale the rear walls of the Bacha Khan campus. “The height of the boundary wall [at the back] is low and the security in that area is also weak,” said Rehman, the computer-science lecturer.

One of his students, Habibullah, said he rushed to the roof his dormitory to hide from the militants. Many students, he said, were still in the dormitory building when the attack began. Among them was a friend of his who was still “sleeping when militants opened fire and killed him.”

More Must-Read Stories From TIME

Contact us at letters@time.com.

Read More From TIME
You May Also Like