Charsadda, Pakistan: The death toll in a gun and explosives attack on a university in northwestern Pakistan has risen to 21, the police told AFP, adding that security forces had ended the operation against the gunmen.
"The death toll in the terrorist attack has risen to 21," regional police chief Saeed Wazir told AFP without specifying if that included the four militants the army stated it had killed.
He said the operation had ended and security forces were clearing the area, with most of the student victims shot dead at a hostel for boys on the Bacha Khan University campus in Charsadda.
The attack on the Bacha Khan University in Charsadda, about 50 kilometres (30 miles) from the city of Peshawar, is the latest to hit the militant-infested region.
As it unfolded
Police, soldiers and special forces launched a ground and air operation at the university in a bid to shut down the assault, as television images showed female students fleeing the campus.
"There are five dead bodies in front of me," said emergency official Bilal Faizi, speaking from the Bacha Khan university in Charsadda. All of them have bullet wounds," he told AFP.
Military spokesman Major General Asim Bajwa said on Twitter that two attackers had been killed.
"Two more terrorists who were firing from inside the Block cordoned by Army troops, shot (and) killed. Op continues."
It was not immediately clear if the two were included in the toll of five given by emergency official Faizi.
Geology student Zahoor Ahmed said he had tried to leave his hostel after hearing shots fired.
"(We) were stopped by our chemistry lecturer who advised us to go inside. He was holding a pistol in his hand," he said.
"Then I saw a bullet hit him. I saw two militants were firing. I ran inside and then managed to flee by jumping over the back wall,"
Dozens of personnel in combat fatigues and automatic weapons piled out of transport vehicles as helicopters buzzed overhead and ambulances with sirens wailing approached the scene.
"There is firing inside the university at Charsadda," Saeed Wazir, a senior police official, told AFP, while Nasir Durrani, police chief of Khyber Pakhtunkhwa province -- of which Peshawar is the capital -- confirmed that the university has been cordoned off.
Officials at two hospitals in the city said a total of six injured people have been brought in from the university, four to the Lady Reading Hospital and two to a Charsadda district hospital.
"There are male and female staff members and students on the campus," Fazal Raheem Marwat, the university vice chancellor, said, adding he had been on his way to work when he was informed of the attack.
"There was no announced threat but we had already beefed up security at the university."
The gunmen had stormed the campus on its southern side, he said.
Naik Mohammed, security chief at the university, said the attackers had entered close to a campus guest house.
Peshawar was the location of Pakistan's deadliest ever extremist attack, when Taliban gunmen stormed an army-run school in December 2014, killing more than 150 people, most of them children, in an hours-long siege.
The attack on the school prompted a crackdown on extremism in Pakistan, with the military prosecuting an offensive against militants in the tribal areas where they had previously operated with impunity.
Pakistan's Jinnah Institute said in a report released on Tuesday that the National Action Plan (NAP) helped curb extremist violence last year, although targeted attacks against religious minorities spiked in the nation of some 200 million people.
"The NAP has allowed improvements in two areas: the first actual implementation of prosecution against hate speech, and the arrest of terrorists from sectarian organisations which feed religious violence," said one of the authors, Syed Hassan Akbar.
On Tuesday, a suicide attack at a market on the city's outskirts killed 10 people in addition to the bomber.