The gunmen entered the Bacha Khan University in Charsadda district of the province, some 50 kms southwest of Peshawar, and opened fire on students and teachers in classrooms and hostels, media reports said.
Blasts and heavy gunfire were heard from inside the University campus.
Pakistan Tehrik-e-Insaf Party leader and provincial lawmaker Shaukat Yousafzai said that 25 people, including a professor, were killed and around 50 others injured in the terrorist attack on the University this morning.
Yousafzai said between four to 10 attackers were involved in attack. "Such cowardice attack could not shake the resolve of the Government in the fight against terrorism," he said.
More From This Section
Soon after the attack, a large contingent of security forces rushed to the site and started evacuating students.
Pakistan Army troops also rushed to the University from Peshawar and started operation.
Army spokesman Lt Gen Asim Salim Bajwa tweeted that four terrorists were killed during operation launched by security forces to clear the University.
Earlier, two terrorists who were firing from inside the university block were shot and killed by the army. The terrorists were contained in two blocks within the university and troops, commandos are participating in the operation.
Surveillance operation has been completed.
Tehreek-e-Taliban Pakistan claimed the responsibility for the attack, the Express Tribune reported.
Citing intelligence sources, media reports said the terrorists are between 18 and 25 years old.
Rahim said four guards of university and one policeman were killed in attack.
Geo TV reported that Professor Hamid Hussain of chemistry department was also among dead.
"A teacher ofthe varsity after evacuation said Chairman Chemistry Department Hamid has been martyred by the firing of the militants," it said, adding the terrorists barged into Hamid's room and fired at his head, killing him instantly.