Islamabad, Pakistan (CNN) Militants raided a university in northwest Pakistan Wednesday, timing their attack to a ceremony at the school to ensure maximum casualties. They slaughtered at least 22 people, a provincial police authority told CNN.

The scent of burning metal hung in the air a few hours after the attack as a CNN crew made its way through the building where many were shot and wounded. Blood covered stairwells, the walls were pockmarked by bullets. Some of the students' laundry still hung in a courtyard.

By Thursday, a day after the bloody attack occurred, Nasir Durrani, deputy inspector general of Khyber Pakhtunkhwa province, said that police were questioning around 50 people for connections to the attack. No arrests have yet been made.

Militants had entered the university campus via a low wall at the back of the compound and made their way systematically across the grounds, throwing grenades and shooting, army spokesman Lt. Gen. Asim Bajwa said.

Khyam Mashal, a student at the university, was in the boys' hostel on the campus, where he lives, when the militants attacked.

He was sleeping when a friend woke him to tell him that terrorists were attacking the school.

He says he was "shocked" that the attackers had breached the school's security.

"I looked through the window so there were two, three people firing, and I think they were the terrorists," he said. "I'm so afraid... my country is not safe. I'm not feeling comfortable."

Conflicting claims

Bacha Khan University is in Charsadda, Khyber Pakhtunkhwa, of which Peshawar is the provincial capital. The city, less than 40 kilometers (25 miles) from Charsadda, is where the Pakistani Taliban slayed 145 people, including 132 children, in a school attack in December 2014

It's unclear whether the group was responsible for this latest atrocity, with conflicting statements issued by the group.

One Pakistani Taliban spokesman, Umar Mansoor, said the attack was in retaliation for military operations against the group. Mansoor was also the mastermind behind the December 2014 attack, Pakistan's DawnNews reported.

But another spokesman, Mohammad Khurrassani, from the Pakistani Taliban's central organization, disavowed any role.

We "strongly condemn the attack on Bacha Khan University in Charsadda and disown the attack, saying this is not according to Shariah," Khurrassani said.

Was attack retaliation?

Despite the conflicting statements from the Pakistani Taliban over responsibility, analysts say the attack probably is the work of the terror group.

"We've seen consistent operations by the Taliban up in this area," CNN counterterrorism analyst Phil Mudd said. "I see this as simply as retaliatory, that is the Taliban saying, 'If you're going to bring Pakistani special forces and the army up into our turf, you're going pay a heavy price.'"

The attack on the university was most likely to avenge military operations that have reduced the power of the Taliban , said Paul Cruickshank, a CNN terrorism analyst.

The central Taliban organization will deny the attack for political reasons, Cruickshank said.

"It's very confusing, but all part of the local dynamics," he said.

Caught off guard

Wednesday was the 28th anniversary of the death of the man the university is named after, Abdul Ghaffar Khan, a 1920s Pashtun independence activist and pacifist also known as Bacha Khan. Guests were gathered at the university to pay tribute to the man when the militants came, said student Zahoor Khan.

Khan said he saw his chemistry professor shot while advising students to stay inside.

Photos: Militants attack Pakistan university Rescue workers transport a wounded man to a hospital following an attack by gunmen on Bacha Khan University in Charsadda, Pakistan, on Wednesday, January 20. Hide Caption 1 of 13 Photos: Militants attack Pakistan university The body of a victim lies in the back of an ambulance while Pakistani troops gather at the main gate of Bacha Khan University. Hide Caption 2 of 13 Photos: Militants attack Pakistan university Rescue workers move an injured victim to an army ambulance. Hide Caption 3 of 13 Photos: Militants attack Pakistan university Rescue workers carry an injured victim from the university. Hide Caption 4 of 13 Photos: Militants attack Pakistan university Rescue workers shout to clear the way for an ambulance transporting an injured victim. Hide Caption 5 of 13 Photos: Militants attack Pakistan university People gather around as policemen move the bodies of attackers. Hide Caption 6 of 13 Photos: Militants attack Pakistan university Pakistani soldiers lead people from the university. Hide Caption 7 of 13 Photos: Militants attack Pakistan university Policemen stand at the bottom of stairs splattered with blood where militants were killed. Hide Caption 8 of 13 Photos: Militants attack Pakistan university Police and onlookers gather in front of a hospital following the attack. Hide Caption 9 of 13 Photos: Militants attack Pakistan university An army helicopter arrives at Bacha Khan University. Hide Caption 10 of 13 Photos: Militants attack Pakistan university A woman cries after her son was injured in the attack. Hide Caption 11 of 13 Photos: Militants attack Pakistan university Soldiers conduct a search operation at the university. Hide Caption 12 of 13 Photos: Militants attack Pakistan university Troops arrive at Bacha Khan University after gunmen stormed the campus. Hide Caption 13 of 13

A student told DawnNews the attackers were in his own age group.

"The attackers were like us -- they were very young. They carried AK-47 guns. They wore jackets like the forces do," said the student, who added that dozens of students were still asleep in their rooms because they didn't have class.

"There was firing between attackers and security forces," the student told DawnNews. "After everything was over, the army men knocked on our room and told us we were safe."

While the attack caught the university off guard, it wasn't completely unexpected.

Pakistan's minister of state education, Muhammad Baligh Ur Rehman, told CNN that security in the region was heightened because of intelligence of a potential attack in tribal areas. The added security at the event helped keep the attackers confined to one side of the university, he said.

"This is part of attacks we have been going through, but the good thing is the frequency with which it was happening has been reduced in a big way, and land for these terrorists has been shrunk in an unprecedented manner," Baligh Ur Rehman said. "We are constantly in this military operation against the terrorists, and they are on the run."

Troops pour in

JUST WATCHED Fareed's Take: Pakistan and the Taliban Replay More Videos ... MUST WATCH Fareed's Take: Pakistan and the Taliban 04:40

In the aftermath, troop transporters pulled up to the gates of the university and entered campus with heavily armed soldiers, video from the scene showed. Other soldiers combed the school's outer walls with guns held at ready.

Ambulances swarmed to the campus. As rescuers rushed to put people on stretchers, injured people who could stand on their own walked past them in the opposite direction.

Some of them held on to others for support. Some cried openly.

Nearby, groups of men carried caskets through the crowd, and ambulance workers rushed back to their vehicles with the injured on their gurneys.

Charsadda Update:clearance of university block by block continues by Army troops.No firing being heard — AsimBajwa (@AsimBajwaISPR) January 20, 2016

Who the Pakistan Taliban are

The Pakistani Taliban, formally known as Tehrik-i-Taliban Pakistan , are separate from the Taliban in Afghanistan but hold close ties to them and to al Qaeda.

The TTP follows its own, different goals, but its tactics are the same as the Afghan Taliban's. Its main target is the Pakistani military and the state, which it would like to overthrow and replace with Sharia law.

The TTP arose in the early 2000s when the Pakistani military began hunting diverse militant groups in the tribal regions near the Afghan border. In reaction, Pakistani militants with ties to the Afghan Taliban galvanized into a Taliban of their own.

Prime Minister's statement

"Prime Minister Muhammad Nawaz Sharif is deeply grieved over the sad incident of terrorists' attack on Bacha Khan University, Charsada, which has reportedly resulted into the loss of precious human lives and injured many others," a statement from the Prime Minister's office read.

"While condemning the cowardly attack of the terrorists, the Prime Minister said that those killing innocent students and citizens have no faith and religion."

CNN Map

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.