KARACHI, Pakistan — At the age of 11, Malala Yousafzai took on the Taliban by giving voice to her dreams. As turbaned fighters swept through her town in northwestern Pakistan in 2009, the tiny schoolgirl spoke out about her passion for education — she wanted to become a doctor, she said — and became a symbol of defiance against Taliban subjugation.

On Tuesday, masked Taliban gunmen answered Ms. Yousafzai’s courage with bullets, singling out the 14-year-old on a bus filled with terrified schoolchildren, then shooting her in the head. Two other girls were also wounded in the attack.

All three survived, but on Wednesday a neurologist said Ms. Yousafzai was in critical condition at a hospital in Peshawar, though doctors had been able to remove a bullet. A government official in Peshawar, speaking on condition of anonymity, said arrangements had been made to send Ms. Yousafzai abroad for treatment, but that doctors had said she should not be moved for now. The two other wounded girls were reported to be in stable condition.

A Taliban spokesman, Ehsanullah Ehsan, confirmed by phone Tuesday that Ms. Yousafzai had been the target, calling her crusade for education rights an “obscenity.”

“She has become a symbol of Western culture in the area; she was openly propagating it,” Mr. Ehsan said, adding that if she survived, the militants would certainly try to kill her again. “Let this be a lesson.”

The Taliban’s ability to attack Pakistan’s major cities has waned in the past year. But in rural areas along the Afghan border, the militants have intensified their campaign to silence critics and impose their will.

Photo

A protest in Peshawar on Wednesday condemning the attack on Malala Yousafzai.Credit
Arshad Arbab/European Pressphoto Agency

That Ms. Yousafzai’s voice could be deemed a threat to the Taliban — that they could see a schoolgirl’s death as desirable and justifiable — was seen as evidence of both the militants’ brutality and her courage.

“She symbolizes the brave girls of Swat,” said Samar Minallah, a documentary filmmaker who has worked among Pashtun women. “She knew her voice was important, so she spoke up for the rights of children. Even adults didn’t have a vision like hers.”

Ms. Yousafzai came to public attention in 2009 as the Pakistani Taliban swept through Swat, a picturesque valley once famed for its music and tolerance and as a honeymoon destination.

Her father ran one of the last schools to defy Taliban orders to end female education. As an 11-year-old, Malala — named after a mythic female figure in Pashtun culture — wrote an anonymous blog documenting her experiences for the BBC. Later, she was the focus of documentaries by The New York Times and other media outlets.

“I had a terrible dream yesterday with military helicopters and the Taliban,” she wrote in one post titled “I Am Afraid.”

The school was eventually forced to close, and Ms. Yousafzai was forced to flee to Abbottabad, the town where Osama bin Laden was killed last year. Months later, in summer 2009, the Pakistani Army began a sweeping operation against the Taliban that uprooted an estimated 1.2 million Swat residents.

The Taliban were sent packing, or so it seemed, as fighters and their commanders fled into neighboring districts or Afghanistan. An uneasy peace, enforced by a large military presence, settled over the valley.

Photo

Pakistani soldiers moved Malala Yousafzai to an army hospital in Peshawar after Pakistani Taliban militants attacked her in the Swat Valley last year.Credit
Agence France-Presse — Getty Images

Ms. Yousafzai’s prominence grew, and she became a powerful voice for the rights of children. In 2011, she was nominated for the International Children’s Peace Prize. Later, Yousaf Raza Gilani, the prime minister at the time, awarded her Pakistan’s first National Youth Peace Prize.

Mature beyond her years, she recently changed her career aspiration to politics, friends said. In recent months, she led a delegation of children’s rights activists, sponsored by Unicef, that made presentations to provincial politicians in Peshawar.

“We found her to be very bold, and it inspired every one of us,” said another student in the group, Fatima Aziz, 15.

An error has occurred. Please try again later.

You are already subscribed to this email.

Ms. Minallah, the documentary maker, said, “She had this vision, big dreams, that she was going to come into politics and bring about change.”

That such a figure of wide-eyed optimism and courage could be silenced by Taliban violence was a fresh blow for Pakistan’s beleaguered progressives, who seethed with frustration and anger on Tuesday. “Come on, brothers, be REAL MEN. Kill a schoolgirl,” one media commentator, Nadeem F. Paracha, said in an acerbic Twitter post.

In Parliament, Prime Minister Raja Pervez Ashraf urged his countrymen to battle the mind-set behind such attacks. “She is our daughter,” he said.

The attack was also a blow for the powerful military, which has long held out its Swat offensive as an example of its ability to conduct successful counterinsurgency operations. The army retains a tight grip over much of Swat. But that Tuesday’s shooting could take place in the center of Mingora, the valley’s largest town, offered evidence that the Taliban were creeping back.

Photo

The attack on Malala Yousafzai occurred in Mingora, Swat Valley’s main town, when masked gunmen stopped a bus carrying schoolgirls who had just taken an exam.Credit
The New York Times

“This is not a good sign,” Kamran Khan, the most senior government official in Swat, said by phone. “It’s very worrisome.”

The Swat Taliban are a subgroup of the wider Pakistani Taliban movement based in South Waziristan. Their leader, Maulvi Fazlullah, rose to prominence in 2007 through an FM radio station that espoused Islamist ideology.

After 2009, Maulvi Fazlullah and his senior commanders were pushed across the border into the Afghan provinces of Kunar and Nuristan, where Pakistani officials say they are still being sheltered — a source of growing tension between the Pakistani and Afghan governments.

But over the last year or so, small groups of Taliban guerrillas have slowly filtered back into Swat, where they have mounted hit-and-run attacks on community leaders deemed to have collaborated with the government.

On Aug. 3, a Taliban gunman shot and wounded Zahid Khan, the president of the local hoteliers association and a senior community leader, in Mingora. It was the third such attack in recent months, a senior official said.

The military has asserted control in Swat through a large military presence in the valleys and support for private tribal militias tasked with keeping the Taliban at bay. But soldiers have also been accused of human rights abuses, particularly after a leaked videotape in 2010 showed uniformed men apparently massacring Taliban prisoners.

In response to criticism, the army chief, Gen. Ashfaq Parvez Kayani, announced an inquiry into the shootings. An army spokesman said it was not yet complete.

Shah Rasool, the police chief in Swat, said that all roads leading out of Mingora had been barricaded and that more than 30 militant suspects had been detained.