Several gunmen have attacked Bacha Khan University in volatile northwest Pakistan, killing over 20 people and injuring dozens of others. The attack is reminiscent of the deadly raid on a Peshawar school just over a year ago.

The attack started Wednesday morning as students and staff were gathering for classes. The death toll of the violence is still being updated, but according to local police has now risen to 21 people.

The final number of dead may rise as high as 40, a Pakistani security official told Reuters. The bodies of students, guards, police officers and a teacher, identified by the media as chemistry professor Syed Hamid Husain, were recovered by rescue workers.

Army troops cordoned off the campus after reports of the gunmen came in. They also held back relatives of the students, who had gathered outside. A military helicopter circled over the area while the military operation was underway.

The attackers scaled the walls of the university using the cover of fog and went on a rampage, indiscriminately killing people, survivors of the attack said. Some of the victims were shot in the head, TV footage of the carnage showed.

Update:Snipers killed 2 more terrorists on roof top,total Terrorist killed so far 4.All buildings&roof top taken over by Army.op continues-3

Bacha Khan University is located in the suburbs of Charsadda, a district capital city in Khyber Pakhtunkhwa province in the turbulent northwest of Pakistan. The province has seen regular clashes between the Pakistani Army and fighters of the Pakistani Taliban militant movement.

The university has around 3,000 students, Vice Chancellor Fazal Raheem told the media. The attack happened as the university was hosting a poetry event attended by around 600 guests. The event was meant to commemorate the death of Khan Abdul Ghaffar Khan, the Pashtun peace activist and spiritual leader, after whom the institution was named.

There was a poetry competition that was to be held today within the University premises in Charsadda. An additional 600 gueats were invited.

Umar Mansoor, a senior Pakistani Taliban commander claimed responsibility for the assault. He told Reuters that the four gunmen killed by Pakistani troops were his men, and said the university was targeted because of its support for the government and the army.

A conflicting statement by Pakistani Taliban spokesman Muhammad Khorasani denied the organization’s involvement, indicating a possible schism among the militants.

In December 2014, Peshawar, in Khyber Pakhtunkhwa, was the site of one of the deadliest terrorist attacks seen in Pakistan. In that incident, a group of Taliban insurgents raided a school for children of military officers, killing 148 people, most of them children.

The Peshawar school attack triggered a strong response from the Pakistani government, which has launched a large-scale military crackdown on the militants. Prime Minister Nawaz Sharif reiterated the resolve to fight terrorism in a statement released after the massacre.