A gun attack on a university in north-west Pakistan, has killed at least 19 people and injured 50, officials say.
Nearly three hours after the attack began, an army official said firing had stopped but troops were searching Bacha Khan University campus in Charsadda.
Troops say at least four attackers have been killed. It is not clear if others are at large.
More than 130 students were killed by Taliban militants at a school in the nearby city of Peshawar in 2014.
Charsadda is about 50km (30 miles) from the city.
The attackers struck at around 09:30 local time (04:30 GMT), reportedly climbing over the back wall, where a university guesthouse is located.
Intense gunfire and explosions were heard as security guards fought the attackers.
“I personally heard two explosions near hostel number one,” an unidentified eyewitness told Pakistan’s Geo TV.
“We don’t know if they were suicide bombers or grenades. I personally saw two explosions and smoke was rising.”
Students and staff ran to find cover in toilets and examination halls.
By the time police and Pakistani army commandos had arrived, several students and staff members were dead and dozens of others wounded.
Most of the people on campus have now been evacuated.
Media are still not being allowed inside the campus due to fears that some gunmen may still be hiding inside.
Nineteen bodies were taken to a local mortuary.
An assistant professor at the university, Dr Shakoor, told the BBC he had turned back from the main gate of the campus after being told it was under attack.
Most of the students and members of the faculty would probably still not have arrived when the attack started, he said.
He saw people coming out through the main gate, apparently because the attackers had entered the campus from the back.
Dr Shakoor said he suspected the attack might have been targeting a poetry gathering scheduled to honour a Pashtun nationalist leader from the Partition era, Bacha Khan, after whom the university is named.
The nationalists, represented by the ANP party, opposed the Taliban and Islamist resistance to the Soviets in neighbouring Afghanistan back in the 1980s, the BBC’s Ilyas Khan says. As such, an attack on the university holds symbolic value for Islamists, our correspondent says.
The university is located in an open area some distance east of Charsadda town, surrounded by open agricultural fields, and is therefore a soft target, he notes.
Bacha Khan is a new university, founded in 2012, its website says.
Just days ago, some schools in Peshawar were closed by the authorities amid reports that militants were planning an attack.
Are you in Charsadda? Have you been affected by what has been happening? If it is safe to do so, you can get in touch by emailing.
Please include a contact number if you are willing to speak to a BBC journalist. You can also contact us in the following ways: