“Who is Malala?” shouted the Taliban gunman who leapt onto a crowded bus in northwestern Pakistan two years ago, then fired a bullet into the head of Malala Yousafzai, a 15-year-old schoolgirl and outspoken activist.

That question has been answered many times since by Ms. Yousafzai herself, who survived her injuries and went on to become an impassioned advocate, global celebrity and, on Friday, the latest recipient of the Nobel Peace Prize alongside the Indian child rights campaigner Kailash Satyarthi.

Yet since that decisive gunshot in October 2012, Ms. Yousafzai and her compelling story have been reshaped by a range of powerful forces — often, though not always, for good — in ways that have left her straddling perilous fault lines of culture, politics and religion.

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.

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.

“I was totally surprised when she told me, ‘Congratulations, you have won the Nobel Peace Prize, and you are sharing it with a great person who is also working for children’s rights,’ ” Ms. Yousafzai said at a news conference.

She will share the $1.1 million prize with Mr. Satyarthi, 60, a veteran, soft-spoken activist based in New Delhi who has rescued trafficked children from slavery.

“If with my humble efforts the voice of tens of millions of children in the world who are living in servitude is being heard, congratulations to all,” Mr. Satyarthi said in a television interview on Friday.

There had been some speculation that the Nobel committee, which last year gave the prize to the Organization for the Prohibition of Chemical Weapons, might withhold it this year, as it did in 1972 during the Vietnam War.

Video

The Indian child rights activist Kailash Satyarthi speaks after receiving the Nobel Peace Prize for his fight against the oppression of children.Published OnOct. 10, 2014CreditCreditAdnan Abidi/Reuters

Yet Ms. Yousafzai offered an emotional counterpoint to grinding conflict in Syria, Iraq and elsewhere. “With her courage and determination, Malala has shown what terrorists fear most: a girl with a book,” said Ban Ki-moon, the United Nations secretary general.

In Pakistan, she has come to symbolize the country’s existential struggle against Islamist violence. She rose to prominence in 2009 as the author of an anonymous blog that described life in Swat at a time when fighters, armed with Kalashnikovs, terrorized the valley’s residents and shut schools where girls were being educated.

Later, she became a national news media figure, speaking about the need for peace, which drew her into the Taliban’s cross hairs. In the summer of 2012, the insurgents hatched a plan to kill her, then put it into action that October.

After the shooting, with life-threatening wounds to her head, Ms. Yousafzai was flown to Britain for treatment. But back in Pakistan, a news media-driven backlash had already started, some of it by crude conspiracy theories — accusations that the teenager was a C.I.A. agent, a blasphemer or a traitor.

Video

Malala Yousafzai speaks on being the youngest person to be awarded the Nobel Peace Prize and sharing the award with another children’s rights activist.Published OnOct. 10, 2014CreditCreditDarren Staples/Reuters

But more reasonable people were discomfited, too — in particular by the way Western news media outlets lionized Ms. Yousafzai at a time when American drones were pounding targets in the tribal areas, sometimes killing civilians.

“Malala’s story, and the way it was framed, fitted neatly into a certain Western narrative,” said Ziyad Faisal, an economics student in Milan, Italy. “But at the end of the day, she’s just a teenage girl. She means so many things to so many people.”

After surgeons inserted a titanium plate in her head, Ms. Yousafzai made a rapid recovery, and quickly drowned out her critics with her preternatural poise and speaking skills. She shifted her focus, moving away from the fight against the Taliban and toward a broader advocacy for children. An alliance with Gordon Brown, the former British prime minister turned education campaigner, honed a message she continued to deliver on Friday.

“This award is for all those children who are voiceless, whose voices need to be heard,” she said. “I speak for them, and I stand up with them.”

Video

A 2009 documentary by Adam B. Ellick profiled Malala Yousafzai, a Pakistani girl whose school was shut down by the Taliban. Ms. Yousafzai was shot by a gunman on Oct. 9, 2012.Published OnOct. 9, 2012

But that advocacy — important yet politically inoffensive — has also drawn sharp criticism from those who say that the choice of Ms. Yousafzai exemplifies the way the Nobel Prize has strayed far from the purpose intended by Alfred Nobel, the Swedish chemist who invented dynamite and who originated the prize.

“This is not for fine people who have done nice things and are glad to receive it,” said Fredrik Heffermehl, a Norwegian jurist who has written a book on the prize. “All of that is irrelevant. What Nobel wanted was a prize that promoted global disarmament.”

Nonetheless, for the many Pakistanis and Indians who enthusiastically hailed the joint win by Ms. Yousafzai and Mr. Satyarthi, it was a welcome taste of what unites, rather than divides their countries: a shared interest in education and in improving the plight of millions of downtrodden and abused children. And for Ms. Yousafzai, it brings her story full circle, back to South Asia.

Once-cynical voices in Pakistan were drowned out on Friday by a chorus of well-wishers. “A bright moment in dark times,” said Nadeem Farooq Paracha, a news media commentator, on Twitter.

But a few clung to the old conspiracy theories. “Her shooting was a ready-made drama that was created by foreign powers,” said Ghulam Farooq, a newspaper editor in Ms. Yousafzai’s hometown, Mingora.

Others noted ironies — that Pakistan’s previous Nobel Prize winner, a scientist from the minority Ahmadi community, had been shunned for his religious beliefs, and that for all of her travel, the one country that Ms. Yousafzai cannot visit, for security reasons, is her own.

“Maybe Malala can come home now?” said Sharmeen Obaid Chinoy, a Pakistani filmmaker who won an Academy Award in 2012.