At least 20 people have been killed in an attack on the Bacha Khan University in Charsadda, northwest Pakistan, on Wednesday. Provincial Minister for Health and Information Shaukat Yousafzai added that more than 50 have been injured, Al Jazeera reported. A security official told Reuters that the toll could rise to 40. The Army said it had concluded operations to clear the campus six hours after the attack began, adding that four gunmen were killed.

The Tehreek-i-Taliban Pakistan, which earlier claimed responsibility for the attack in a Facebook post, later denied any involvement. In a statement, Mohammad Khurasani described the attack as "un-Islamic" and said the group would hold people accountable for using its name. The group was also responsible for an attack on a school in Peshawar in 2014 that killed over 130 children.

Here is how the story unfolded:

4.10 pm: Pakistan has confirmed that the Army operation to end the attack at the university is now over. An official also put the official toll at 20, reported AP. Army chief General Raheel Sharif visited the campus after the police and soldiers cleared the area, according to spokesman Asim Bajwa.

4 pm: Opposition leader Imran Khan of the Pakistan Tehreek-e-Insaaf has condemned the attack and described it as cowardly. His party governs the Khyber Pakhtunkhwa province in which the attack took place. The cricketer-turned-politician is expected to visit the university.

3.10 pm: The Tehreek-i-Taliban Pakistan, which earlier claimed responsibility for the attack in a Facebook post, has now denied any involvement, reported the BBC. In a statement, Mohammad Khurasani described the attack as "un-Islamic" and said the group would hold people accountable for using its name.

3 pm: Pakistan Army chief General Raheel Sharif has arrived at the Bacha Khan university, reported The Guardian. He is to briefed on the unfolding situation as soldiers continue to sweep the campus for militants.

2.30 pm: Prime Minister Narendra Modi on Wednesday condemned the attack on the Bacha Khan University in Pakistan. Modi passed on his sympathies to the families of the victims in a Twitter post:

Pakistan Prime Minister Nawaz Sharif condemned the attack, saying that those who kill innocents and civilians "have no religion", and that the country's sacrifices will not go in vain.

On Wednesday morning, the gunmen opened fire on students and teachers in classrooms and hostels in the university in Khyber Pakhtunkhwa province’s Charsadda, around 50 km from Peshawar. The injured students were taken to District Headquarters Hospital in Charsadda, and an emergency has been declared in all hospitals in the district.

According to Arshad Ali, a member of the provincial assembly from Khyber Pakhtunkhwa, the assailants entered the university after scaling its walls. Television reports said a large contingent of security forces had arrived at the scene. An eyewitness who escaped from the campus said at least three to four security guards are injured. According to intelligence officials, there are eight to 10 terrorists still inside the university campus.

There were 600 additional people on campus as the university was hosting a poetry recital to mark the death anniversary of independence activist Bacha Khan. The institution has more than 3,000 students enrolled in it.