Filmmaker Davis Guggenheim first learned of Malala Yousafzai via a 32-minute New York Times documentary, “Class Dismissed: Malala’s Story.”

The film by Adam B. Ellick profiled Malala at 11, when she was a girl in Pakistan’s Swat Valley. After the Taliban closed her school, she dared to protest. Her courage impressed Guggenheim, winner of the Academy Award in 2007 for the global-warming documentary “An Inconvenient Truth.”

“Her voice was so clear,” said the director of “He Named Me Malala,” a new documentary about Malala that opens Friday. “And it spoke to me, in a way that it spoke to a lot of people.”

Three years after the New York Times film appeared, a Taliban gunman shot and severely wounded Malala on a school bus. Her friends Shazia Ramzan and Kainat Riaz also were wounded in the attack. Guggenheim, like millions of others, learned of the shooting through global news reports.

“You already think things are bad and then they do that,” he said. “It was horrifying.”

The director followed Yousafzai’s developing story for days. “It was an intense week where everyone wondered if she was going to live,” the Venice, California-based filmmaker said. “They were even talking about it at my kids’ school.”

As the incessant drumbeat of more bad news stories followed, however, the attack receded from the news media and from Guggenheim’s thoughts. Less than a year after the shooting, a phone call from producers Walter Parkes and Laurie MacDonald brought Malala back to Guggenheim. They asked if he’d like to make a documentary about the girl who defied the Taliban by advocating for the education of girls.

Guggenheim asked for a few days to consider the proposal.

“Because some stories are very difficult to tell,” he said. “Some are impossible tell. And some are just not for me.”

In his research about Malala, Guggenheim realized that the shooting that nearly killed her was a small part of what makes her extraordinary.

“This is a father-daughter story,” he said. “There’s something so special about it that it reached across the globe, 7,000 miles away, to me and my two daughters. I love that universality.”

Educator Ziauddin Yousafzai named his daughter after Malalai of Maiwand, a young Pashtun woman often compared to Joan of Arc. Malalai was killed in 1880 during a battle between Pashtun fighters in Afghanistan and the colonizing British. She was 19.

Guggenheim believes that Malala’s courage comes from a combination of her parents’ qualities.

“Her father believes in social justice and human rights,” the director said. “He really has a big, passionate, dreaming heart. But her mother has moral clarity, spiritual clarity and simple strength. Malala got the best of both of them.”