(ABC NEWS) -- From a valley 7,000 miles away, Malala Yousafzai was a powerful light.
She was just a child who loved books living in the Swat Valley in northwest Pakistan when the Taliban arrived, and banned and bombed schools for girls. They threw acid in the faces of students as women in the streets hid their faces. But not Malala. She had the powerful certainty that getting her education was her whole life.
"We are starving for education," she told ABC News' Diane Sawyer in an exclusive interview. "For us, it's like a precious gift. It's like a diamond."
Don't miss a special primetime hour on Malala, "Unbreakable," airing on "20/20," Friday at 10 p.m. ET.
"They cannot stop me," she said in a New York Times documentary. "I will get my education, if it is in [the] home, school or anyplace."
She was persistent, even when the Taliban threw corpses in the street and flogged women publicly, enforcing an ancient Pashtu proverb that women belonged in the home or in the grave.
"We are starving for education. ... For us, it's like a precious gift. It's like a diamond."
Tuesday she is set to release a book, "I Am Malala," and has become the youngest person to ever be nominated for a Nobel Peace Prize.
But Malala, 16, told ABC News that she felt fear all the time in Swat Valley.
"At night, when I used to sleep, I was thinking all the time that shall I put a knife under my pillow?" she said. "The time was of fear, but some people can overcome fear and some people can fight fear."
"I think life is always dangerous," Malala said. "Some people get afraid of it. Some people don't go forward. But some people, if they want to achieve their goal, they have to go. They have to move. And we have seen the barbaric situation of the 21st century in Swat. So why should I be afraid now?"
So she decided to send a message to the world. Like Anne Frank, she chronicled her life in a diary, but Malala's was published in blog form by the BBC, and, for her safety, she wrote under assumed the name "Cornflower."
Then at age 11, Malala went on camera for an online interview, calling for help. It was one of her first.
"You must have the confidence to say that this thing is going wrong, and we must raise our voice," she said in the tape.
After The New York Times heard about her and made a documentary, Malala became a kind of eloquent force. And the radical Taliban, now in hiding, decided that she had to die.
Malala said she'd rehearsed in her mind what she would say if ever an attacker came.
"It was always my desire before the attack that if a man comes, 'What would you tell him, Malala?'" she told Diane Sawyer. "I used to think like that. ... I will tell that man that I even want education for your daughter."
She said she thought words and pens were more powerful than guns.
In October 2012, she was on a school bus with other girls, singing. She said they were just making music. All her friends' faces were covered, but not hers.
"At that time, I wanted to live my life as I want," she said.
She said on that day, she noticed the road was strangely quiet. It was a short bus ride.
"I just could see, like, there's no one ... because there used to be a huge crowd on that road," she said. "And on that day, there was no one."
Suddenly, two men approached -- one of them carrying a Colt 45. He climbed onto the bus and asked: "Who is Malala?" She said she could not remember what happened next but said her friend had filled in the gaps.
"She said, like, 'You said nothing, and you were just for, you were just holding my hand and you just squeezed my hand, like you were just forcing it. And you said nothing,'" Malala said. "And she said, like, 'You just looked at, looked at the men like this.'"
He fired his gun at Malala three times. One bullet hit her on the left side of her head.
Her survival was the result of many miracles -- one being that a specialist from England was in Pakistan and rushed to save her.
"The chances of being shot at point-blank range in the head and that happening [Malala surviving], I don't know," said Dr. Fiona Reynolds. "But it is amazing, truly amazing. I don't know why she survived."
Malala said that death was not ready to take her.
"I think that death didn't want to kill me," she said. "And God was with me. And the people prayed for me."
Now Malala and her family are living in Birmingham. England, and she is back at school. She spent her 16th birthday giving a speech at the United Nations.
She has also founded the Malala Fund, a nonprofit organization that supports girls' education around the world through grants and partner collaborations.