Last Updated Oct 15, 2012 10:24 AM EDT
Malala earned the enmity of the Pakistani Taliban for publicizing their behavior when they took over the northwestern Swat Valley, where she lived, and for speaking about the importance of education for girls.
The group first started to exert its influence in Swat in 2007 and quickly extended its reach to much of the valley by the next year. They set about imposing their will on residents by forcing men to grow beards, preventing women from going to the market and blowing up many schools the majority for girls.
Malala wrote about these practices in a journal for the BBC under a pseudonym when she was just 11. After the Taliban were pushed out of the Swat Valley in 2009 by the Pakistani military, she became even more outspoken in advocating for girls' education. She appeared frequently in the media and was given one of the country's highest honors for civilians for her bravery.
The military carried out its offensive in Swat after a video surfaced of a militant flogging a woman who had allegedly committed adultery, which helped mobilize public support against the Taliban.
Many hope the shooting of Malala will help push the military to undertake a long-awaited offensive in the Pakistani Taliban's last main sanctuary in the country in the North Waziristan tribal area.
The police station attacked by the Taliban on Sunday night was located in the small town of Matni, some 12 miles south of Peshawar, said police officer Ishrat Yar. The militants were armed with heavy machine guns, rocket-propelled grenades, hand grenades and assault rifles.
One of the policemen who was beheaded was a senior official who commanded several police stations in the area and was leading reinforcements against the attack, said Yar. Another 12 policemen received gunshot wounds.
The militants burned the police station and four police vehicles before they escaped, said Yar.
A Pakistani Taliban spokesman, Mohammad Afridi, claimed responsibility for the attack, saying the police were targeted because they had killed several militants.
The Taliban have carried out hundreds of attacks throughout Pakistan but the attacks rarely include such a high number of militants as in the assault on the police station in Matni.