It is also believed the school may have been targeted because it is named after a late secular icon and ally of Gandhi

last year and attacks by Taliban on girls' education

Known as 'The Protector' because he was keen hunter and kept 9mm pistol, possibly in light of other militant attacks

Chemistry lecturer Syed Hamid Husain, 32, shielded students by opening fire on militants as they stormed campus

Fanatics stormed Bacha Khan university near Peshawar in the


A chemistry lecturer known as 'The Protector' died saving his students by firing back at Taliban militants during a deadly attack on their university that left 30 dead and dozens injured today.

Gunmen stormed the Bacha Khan University in Pakistan in an assault that echoed a horrifying Taliban massacre on a nearby army-run school and previous attacks against girls' education, notably the failed assassination attempt of Malala Yusufzai in 2012 in the same province.

It is also believed the school may have been targeted because it is named after Khan Abdul Ghaffar Khan, a towering secular figure in Pakistani politics and ally of Mahatma Gandhi.

As militants stalked the campus, executing targets one by one, assistant chemistry professor Syed Hamid Husain, 32, ordered his pupils to stay inside as he confronted the attackers.

The father-of-two opened fire, giving them time to flee before he was cut down by gunfire as male and female students ran for their lives.

He was known to his pupils as 'The Protector' because he was a keen hunter and kept a 9mm pistol at school, possibly in light of previous militant attacks.

Scroll down for videos

'The Protector': Chemistry lecturer Syed Hamid Husain (left) allowed his students to escape a Taliban massacre by opening fire on militants who attacked at the Bacha Khan university in Pakistan. Blood stains and flak jackets used by the attackers are seen in a dormitory (right)

Scene of horror: Pakistani students look at a blood-soaked room inside a hostel after the attack at Bacha Khan University in Charsadda

Taliban gunmen stormed the school near the city of Peshawar, leaving dozens dead and injured in pools of blood across the campus

Taken out: A Pakistani security officer drags the dead body of a terrorist following the attack at Bacha Khan University in Charsadda town

Grim: A man walks down the blood-stained stairs leading down from the roof of a dormitory where the militant attack took place

One student said: 'We saw three terrorists shouting "Allah is great!" and rushing towards the stairs of our department.

'One student jumped out of the classroom through the window. We never saw him get up.'

He described seeing Husain holding a pistol and firing at the attackers, adding: Then we saw him fall down and as the terrorists entered the (registrar) office we ran away.'

Geology student Zahoor Ahmed said Husain had warned him not to leave the building after the first shots were fired.

'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.'

'They fired directly at' the professor, sociology student Muhammad Daud said, describing Husain as 'a real gentleman and a respectable teacher'.

Students and university officials paid tribute to the slain academic, saying he had been nicknamed 'The Protector' even before his death.

'He would always help the students and he was the one who knew all their secrets because they would share all their problems with him,' said 22-year-old geology student Waqar Ali. 'He was referred to by students as "The Protector".'

Rescuers move an injured victim at a hospital following an attack by gunmen in the Bacha Khan university in Charsadda, about 50 kilometres from Peshawar, which has left at least 21 people dead and dozens wounded

Dozens of people were killed and injured after militants armed with AK-47s stalked the university

Victim: Medical officers treat a man injured in an attack by militant gunmen on Bacha Khan University in Charsadda in northwest Pakistan that has left at least 21 people dead and dozens injured

Husain had been the father of a three-year-old boy and a daughter who had recently celebrated her first birthday, a university administration official told AFP news agency.

He had spent three years studying in the UK for his PhD, the official said.

Mohammad Shazeb, a 24-year-old computer science student, said Husain was fond of gardening and used to joke with the students that they should learn gardening for when they are unemployed.

'He had a 9mm pistol and used to tell us stories about his hunting trips,' Shazeb said.

Husain also never missed a game of cricket with the students, he said, adding: 'When someone would go to bowl to him, he would joke: 'Remember kiddo, I have a pistol''.

Tributes were also paid online to the slain teacher, whose funeral was held in his home village of Swabi Wednesday evening.

'Martyr of #education: Prof Hamid who was killed by terrorists in #BachaKhanUniversity#Pakistan,' tweeted journalist and academic Raza Ahmad Rumi.

Pakistani rescuers carry the wounded following an attack by militants at the university in Charsadda today

An injured man is taken to a hospital in Charsadda, in northwestern Khyber Pakhtunkhwa province

A teacher walks with a pair of crutches after being rescued from the university by the Pakistani army

HOW THE TALIBAN ASKED FOR HER BY NAME: THE STORY OF MALALA In January 2008 the Taliban, who controlled the Swat region, declared girls would no longer be allowed to go to school. Acid attacks, abuse and even killing were used as punishment. With her father Ziauddin's backing, Malala Yousafzai kept an online diary and did interviews with journalists to encourage girls to seek education. Malala was barely 11 years old when she began championing girls' education, speaking out in TV interviews. The Taliban had overrun her home town of Mingora, terrorizing residents, threatening to blow up girls' schools, ordering teachers and students into the all-encompassing burqas. Unfortunately, Malala's brave stance made her a target. She does not remember being shot on a schoolbus in October 2012. But her horrified friends recall that the Taliban asked for Malala by name before shooting straight at her head. Everything, from schoolbooks to clothes, were soaked in blood and Malala was near death. She travelled to Britain for treatment but her injuries were so bad that her father asked relatives to start arranging her funeral. However, Malala slowly pulled through after being transferred to an army cardiology hospital with better intensive care. She now lives in Birmingham with her family and started at Edgbaston High School for Girls in March 2013. She has been invited to a reception for Youth, Education and the Commonwealth, being hosted by the Queen and the Duke of Edinburgh, at Buckingham Palace this month. It is thought the Queen herself was impressed by her bravery. It has also led to her being named as the world's youngest ever Nobel Peace Prize winner. Advertisement

Pakistan's President Mamnoon Hussain expressed his grief and condolences to the man's family.

Police inspector Saeed Wazir said 70 per cent of the students had been rescued.

'All students have been evacuated from the hostels, but militants are still hiding in different parts of the university and some students and staff are stuck inside,' he said before the firing had stopped, adding that it was unclear how many gunmen were involved.

A Taliban leader, Khalifa Umar Mansoor, claimed responsibility for the attack.

Mansoor, who was the mastermind mind the Peshawar school attack, said a four-man Taliban team carried out the assault in Chasadda.

He said it was in revenge for the scores of militants the Pakistani security forces have killed in recent months.

However, a spokesman for the main Taliban faction in Pakistan later disowned the group behind Wednesday's attack, describing the assault as 'un-Islamic.'

Mohammad Khurasani also denied earlier reports that he had endorsed Mansoor's claim and said that those who carried out such attacks would be tried before an Islamic, or Sharia court.

Pakistani security officials take position outside the Bacha Khan university following the attack

Soldiers with automatic weapons and rocket launchers take their positions outside the university

Police and special forces launched a ground and air operation at the university in a bid to shut down the attack

Such statements from among the Taliban are not uncommon since the group has many loosely linked factions and is indicative of the deep divisions and splits among the insurgents.

Wednesday's assault targeted a school named after Khan Abdul Ghaffar Khan, nicknamed Bacha Khan, a towering secular figure in Pakistani politics who died in 1988.

An ally of Mahatma Gandhi, Khan supported non-violent resistance to British colonialism and opposed the 1947 partition.

His son went on to found the Awami National Party, a secular, leftist movement whose vision for Pakistan is starkly opposed to that of the Taliban and other Islamic militants, who for more than a decade have been fighting to overthrow the government and establish a strict Islamic State.

Fanatics stormed the Bacha Khan university in Charsadda, around 30 miles from the city of Peshawar, in the latest outrage to hit the militant-infested region.

Many were apparently shot in the head execution-style as militants armed with AK-47 machine guns stalked the premises.

Television footage showed military vehicles packed with soldiers driving into the campus as helicopters buzzed overhead and ambulances lined up outside the main gate while anxious parents consoled each other.

A senior security officer said 90 per cent of the campus had been secured after a three-hour gunfight with the militants ended, and that 51 people were wounded and four gunmen were killed.

Shabir Khan, a lecturer in the English department, said he was about to leave his university housing for the department when firing began.

'Most of the students and staff were in classes when the firing began,' Khan said. 'I have no idea about what's going on but I heard one security official talking on the phone to someone and said many people had been killed and injured.'

Army officials with heavy weapons were seen arriving at the Bacha Khan University in Charsadda after gunmen stormed the campus

Soldiers enter the Bacha Khan university during the attack by militants

Chemistry professor Syed Hamid Hussain (left) was hailed a hero after firing back against the militants with a handgun in a bid to protect his pupils before being shot dead. Pictured right: Survivors comfort each other

Charsadda is located in the country's volatile north-west, around 40km north-east of Peshawar where the Taliban massacre of 130 children occurred in December 2014

Prime Minister Nawaz Sharif: 'We are determined and resolved in our commitment to wipe out the menace of terrorism from our homeland.'

Teachers in northwest Pakistan were given permission to carry firearms in the classroom after Taliban militants massacred more than 150 people, the majority of them children, at a school in the city of Peshawar in 2014.

The attack on an army-run school in the city, some 30 miles from Charsadda, was the deadliest in Pakistani history, and saw armed militants go from room to room slaughtering students and staff.

Teachers' associations had objected to arming staff, saying it was not their job to fight off militants.

Pakistan's Jinnah Institute said in a report released Tuesday that the National Action Plan (NAP) helped curb extremist violence last year, although targeted attacks against religious minorities spiked in the Muslim nation of some 200 million people.

The university is named after Khan Abdul Ghaffar Khan, nicknamed Bacha Khan or Pacha Khan.

The bodies of a victims are placed in coffins at a hospital in Charsadda after the gun attack

Rescue workers move coffins to transport bodies of victims of the gun attack on Bacha Khan University

Army soldiers and police swarmed the university where thousands of students were thought to be on Wednesday morning

As many as 3,000 people were reported as present at the university when the gunmen arrived

He was a Pashtun independence activist who campaigned against the rule of the British Raj. January 20 – today – is the 28th anniversary of his death.

The attack came a day after a suicide bomber blew himself up close to a police checkpoint in northwestern Pakistan on Tuesday, killing at least 10 people and wounding more than 20.

The bomber rammed his motorcycle into a police vehicle next to the roadside checkpoint in the Jamrud area on the edge of Pakistan's volatile Federally Administered Tribal Areas, local government official Munir Khan said.

Last month, a suicide bomber attacked a government office in northwestern Pakistan, killing at least 23 people.

BACHA KHAN: THE NAMESAKE OF TERROR TARGET UNIVERSITY Khan Abdul Ghaffar Khan, nicknamed Bacha Khan or Pacha Khan, was a Pashtun independence activist who campaigned against the rule of the British Raj. He was a devout Muslim and a political and spiritual leader known for his nonviolent opposition. Bacha Khan University in Charsadda, Pakistan, was named in honour of the activist who promoted a message of peace and universal brotherhood. Khan was a close friend of Mohandas Gandhi and was even nicknamed the 'Frontier Gandhi' in British India. There are no immediate reports of injuries at the university (pictured) He was born in 1890 in the town of Utmanzai — not far from Peshawar, in what was then the Northwest Frontier Province of India. At the age of 20, he opened a mosque school in his hometown, but it was banned by British authorities five years later. Shortly after meeting Gandhi in 1919 Khan founded the Khudai Khidmatgars or 'Servants of God' to expand his revolutionary work. He was arrested in 1930 during protests following the famous Salt March which saw British troops open fire on the unarmed crowd. Khan formed Pakistan's first National opposition party, the Pakistan Azad Party, on 8 May 1948. He spent much of the 1960s and 1970s either in jail or in exile and died on 20 January 1988 in Peshawar under house arrest. The political leader was buried at his house in Jalalabad, Afghanistan. Tens of thousands of mourners attended his funeral, marching through the Khyber Pass from Peshawar to Jalalabad, although it was marred by two bomb explosions killing 15 people. Advertisement

A suicide bomber blew himself up close to a police checkpoint in northwestern Pakistan yesterday, killing at least 10 people and wounding more than 20