Militants stormed into the Bacha Khan University in Charsadda, in Pakistan's Khyber Pakhtunkhwa province early on Wednesday and opened fire.
According to reports, a professor and two students are among the 21 people killed in the attack. The Indian Express reported that 50 people have been wounded in the attack.
Dawn.com quoted Pakistan DIG Saeed Wazir as saying that two attackers had been killed.
Pakistan SSG special forces have entered the campus where a gunfight is currently on. Sounds of explosions and gunfire were heard from the campus where a number of students are still reportedly being held hostage.
Dawn also reported that 50 students have been rescued from the campus, of which five have been sent to nearby hospitals for treatment.
The attack unfolded as a poetry recitation to mark the birth anniversary of the founder university was underway.
Pakistan's Capital TV reported that two terrorists have been killed.
ANI quoted the Pakistan army as saying that the militants have been contained in a 2-block radius within the university.
In a statement, Pakistan Prime Minister Nawaz Sharif said he was monitoring the operation. "Those who kill innocent students and civilians have no religion," he said.
Pakistan Express Tribune reported that Tehreek-e-Taliban had claimed responsibility for the attack. The Express Tribune quoted TTP commander Omar Mansoor as saying that four attackers had carried out the strike.
"We are determined and resolved in our commitment to wipe out the menace of terrorism from our homeland... The countless sacrifices made by our countrymen will not go in vain."
The attack has drawn comparison to the 16 December 2014 terror attack by the Tehreek-e-Taliban Pakistan on the Peshawar Army Public School, which claimed the lives of 144 people, mostly students.
Watch this space for updates.