The gunmen entered the Bacha Khan University named after iconic leader Khan Abdul Ghaffar Khan alias Bacha Khan in Charsadda, some 50 km southwest of Peshawar in Khyber- Pakhtunkhwa province, and opened fire on students and teachers in classrooms and hostels, police said.
Earlier, reports said that 21 people and four terrorists were killed but later army spokesman Lt Gen Asim Bajwa held a press conference and stated that 20 people -- 18 students, a professor and a staffer -- and four terrorists had been killed in the attack.
Blasts and heavy gunfire were heard from inside the campus where a poetic symposium was in progress to mark the death anniversary of Bacha Khan who died on January 20, 1988.
There were about 3,000 students and 600 guests on the campus when the attack took place, Vice Chancellor of the university Dr Fazal Rahim said.
More From This Section
Omar Mansoor, Peshawar school attack mastermind and a commander of the Hakimullah Mehsud faction of the Tehreek-e- Taliban Pakistani (TTP), claimed responsibility for today's assault.
A spokesman of the militant group said it was revengefor those killed by security forces since Peshawar school attack. The attacks would continue, he warned. But the spokesman of another Taliban faction, Mohammad Khurasani, condemned the attack and said they were not involved in it.
Bajwa said "major breakthroughs" had been made in identifying the terrorists who attacked the university.
The Inter-Services Public Relations chief said the terrorists' phone calls had been traced and analysed, and that two cell phones had also been recovered from them.
He said the attack was in response to military operation in the province which has broken the back of militants.
The victims were shot in the head or chest. Images from inside the university showed a pool of blood on the floor of a dormitory and charred corpses of two alleged militants lying on a staircase.
11 people were injured in the attack and were shifted to a hospital. An emergency has been declared in all hospitals in the town. All schools have been closed in the area.