At least 20 people have been killed in an attack that lasted six hours at a university in northwest Pakistan, according to an army spokesperson.
Attackers scaled a wall and cut through barbed wire on Wednesday morning at the Bacha Khan University in Charsadda, about 140km from the capital Islamabad.
The attack left at least 50 people injured. A security official said the death toll could rise to as high as 40.
“The operation is over and the university has been cleared,” Pakistan Army spokesperson General Asim Bajwa told Reuters news agency.
“Four gunmen have been killed.”
One Pakistani Taliban commander said the group had carried out the assault, but its main spokesman denied this.
The group killed 130 students at a school in the city of Peshawar, 50km (30 miles) from Charsadda, in 2014.
Just days ago, some schools in Peshawar were closed by the authorities amid reports that militants were planning an attack.
The past few days have seen an increase in militancy in the region, including an attack on a checkpoint in Khyber Agency, a region west of Peshawar that borders Afghanistan, where 10 people were killed and 36 others injured.