In Pakistan, conservatives assailed the schoolgirl as an unwitting pawn in an American-led assault. In the West, she came to embody the excesses of violent Islam, or was recruited by campaigners to raise money and awareness for their causes. Ms. Yousafzai, guided by her father and a public relations team, helped to transform that image herself, co-writing a best-selling memoir.

Image Kailash Satyarthi, an Indian children's rights campaigner. Credit... Chandan Khanna/Agence France-Presse — Getty Images

And now the Nobel Prize committee has provided a fresh twist on her story, recasting her as an envoy for South Asian peace.

Announcing the prize in Oslo on Friday, the committee chairman, Thorbjorn Jagland, said it was important for “a Hindu and a Muslim, an Indian and a Pakistani, to join in a common struggle for education and against extremism” — a resonant message in a week in which the Pakistani and Indian armies have exchanged shellfire across a disputed stretch of border, killing 20 villagers. But it was also a message that highlighted how far Ms. Yousafzai has come from her original incarnation as the schoolgirl who defied the Taliban and lived to tell the tale.

Amid the debate about the politics of her celebrity, few question the heroism of Ms. Yousafzai — a charismatic and exceptionally eloquent teenager who has followed an astonishing trajectory since being airlifted from Pakistan’s Swat Valley. At just 17, she has visited with President Obama and the queen of England, addressed the United Nations, and become the youngest recipient of the Nobel Peace Prize since it was created in 1901.

She learned of her award on Friday when a teacher called her from a chemistry lesson at Edgbaston High School for Girls in Birmingham, the English city she now calls home.