The Tehreek-e-Taliban Pakistan (TTP), also known as the Pakistani Taliban, claimed responsibility for the attack.
Ehsanullah Ehsan, a Pakistani Taliban spokesperson, said the group had repeatedly warned Yousafzai to stop speaking out against them.
"She is a Western-minded girl. She always speaks against us," he said by telephone from an undisclosed location.
"We will target anyone who speaks against the Taliban.
"We warned her several times to stop speaking against the Taliban and to stop supporting Western non-governmental organisations, and to come to the path of Islam."
Taliban's justification
The Taliban said it was not only "allowed" to target young girls, but it was "obligatory" when such a person "leads a campaign against Islam and sharia".
The spokesman also referred to the Quranic story of Hazrat Khizar, who killed a young child, justifying it to Prophet Musa (Moses in other religions), by saying the boy would overburden his pious parents with his disobedience, and that God would "replace" the boy with a more obedient son.
Ehsan said that the Pakistani Taliban had not banned education for girls, "instead, our crime is that we tried to bring the education system for both boy and girls under Islamic law.
IN VIDEO
Asma Jahangir, human rights lawyer, discusses the state of women's rights in Pakistan
"We are deadly against co-education and secular education systems, and Sharia orders us to be against it".
The group also criticised media coverage of the shooting, saying: "After this incident, [the] media poured out all of its smelly propaganda against Taliban mujahideen with their poisonous tongues.
" [...] will the blind media pay any attention to the hundreds of respectful sisters whom are in the secret detention centres of ISI [Pakistan's spy agency] and suffering by their captivity?
"Would you like to put an eye on more than 3,000 young men killed in secret detention centres, whose bodies are found in different areas of Swat, claimed to be killed in encounters and died by cardiac arrest?"