In this exclusive excerpt from her autobiography, I Am Malala, young activist Malala Yousafzai recounts the day she was shot by the Taliban.

In a country that’s seen more than its share of violence, the fate of one teenager might not seem to count for much. But somehow Malala Yousafzai of Pakistan has managed to become an international inspiration. She was only 11 when she took on the Taliban, demanding that girls be given full access to school. Her campaign led to a blog for the BBC, a New York Times documentary (watch it below), and a Pakistani peace prize. But all that was only a prelude to even more extraordinary events. Last October, Taliban assassins attacked Malala, then 15, on her way home from school, shooting her in the head. Here, Malala describes that day and offers her hopes for the future.

Tuesday, Oct. 9, 2012, wasn’t the best of days to start with, as it was the middle of exams—though as a bookish girl I didn’t mind them as much as some of my classmates did. That morning we arrived in the narrow mud lane off Haji Baba Road in our usual procession of brightly painted rickshaws sputtering diesel fumes, each one crammed with five or six girls. Since the time of the Taliban, our school has had no sign and the ornamented brass door in a white wall gives no hint of what lies beyond.

For us girls, that doorway was like a magical entrance to our own special world. As we skipped through, we cast off our head scarves and ran helter-skelter up the steps. At the top of the steps was an open courtyard with doors to all the classrooms. We dumped our backpacks in our rooms, then gathered for assembly under the sky, our backs to the mountains.

The school was founded by my father before I was born, and on the wall above us, “Khushal School” was painted proudly in red and white letters. We went to school six mornings a week, and as I was in Year 9, my classes were spent chanting chemical equations or studying Urdu grammar, writing stories in English with morals like “Haste makes waste” or drawing diagrams of blood circulation—most of my classmates wanted to be doctors. It’s hard to imagine that anyone would see that as a threat. Yet outside the school lay not only the noise and craziness of Mingora, the main city of the province of Swat, but also those, like the Taliban, who think girls should not go to school.

Because it was exam time, school started at 9 instead of 8 that morning, which was good, as I don’t like getting up and can sleep through the crows of the roosters and the prayer calls of the muezzin.

Malala as a toddler with her brother Khushal in Mingora, Pakistan.

I slept in the room at the front of our house. The only furniture was a bed and a cabinet that I had bought with the money I’d been given as an award for campaigning for peace in our valley and the right for girls to go to school. On some shelves were the gold-colored plastic cups and trophies I had won for coming first in my class. There were a few times I had not come out on top—both times I was beaten by my class rival, Malka-e-Noor. I was determined it would not happen again.

The school was not far from my home and I used to walk, but since the start of the last year I had been going with other girls in a rickshaw and coming home by bus. It was a journey of five minutes along the stinky stream, past the giant billboard for Dr. Humayun’s Hair Transplant Institute, where we joked that one of our bald male teachers must have gone when he suddenly started to sprout hair. I liked riding the bus because I didn’t get as sweaty as when I walked, and I could chat with my friends and gossip with Usman Ali, the driver, whom we called Bhai Jan, or “brother.” He made us all laugh with his crazy stories.

I had started taking the bus because my mother worried about me walking on my own. We had been getting threats all year. Some were in the newspapers, and some were messages passed on by people. I was more concerned the Taliban would target my father, as he was always speaking out against them. His friend and fellow campaigner Zahid Khan had been shot in the face in August on his way to prayers.

Our street could not be reached by car. I would get off the bus on the road below, go through an iron gate and up a flight of steps. Sometimes I’d imagine that a terrorist might jump out and shoot me on those steps. I wondered what I would do. Maybe I’d take off my shoes and hit him. But then I’d think that if I did that, there would be no difference between me and a terrorist. It would be better to plead, “Okay, shoot me, but first listen to me. What you are doing is wrong. I’m not against you personally. I just want every girl to go to school.”

I wasn’t scared, but I had started making sure the gate was locked at night and asking God what happens when you die. I told my best friend, Moniba, everything. We’d lived on the same street when we were little and had been friends since primary school. We shared Justin Bieber songs and Twilight movies, the best face-lightening creams. Moniba always knew if something was wrong. “Don’t worry,” I told her. “The Taliban have never come for a small girl.”

In a photo taken before the attack, Malala is reading a story on the whiteboard at her school in Pakistan.

When our bus was called, we ran down the school steps. The bus was actually a white Toyota truck with three parallel benches. It was cramped with 20 girls and three teachers. I was sitting on the left between Moniba and a girl named Shazia Ramzan, all of us holding our exam folders to our chests.

Inside the bus it was hot and sticky. In the back, where we sat, there were no windows, just plastic sheeting, which was too yellowed to see through. All we could see out the back was a little stamp of open sky and glimpses of the sun, a yellow orb floating in the dust that streamed over everything.

Then we suddenly stopped. A young bearded man had stepped into the road. “Is this the Khushal School bus?” he asked our driver. Usman Bhai Jan thought this was a stupid question, as the name was painted on the side. “Yes,” he said.

“I need information about some children,” said the man. “You should go to the office,” said Usman Bhai Jan. As he was speaking, another young man approached the back of the van.

“Look, it’s one of those journalists coming to ask for an interview,” said Moniba. Since I’d started speaking at events with my father, journalists often came, though not like this, in the road.

The man was wearing a peaked cap and had a handkerchief over his nose and mouth. Then he swung himself onto the tailboard and leaned in over us. “Who is Malala?” he demanded.

No one said anything, but several of the girls looked at me. I was the only girl with my face uncovered.

That’s when he lifted up a black pistol. Some of the girls screamed. Moniba tells me I squeezed her hand.

During her stay in the hospital, Malala received thousands of letters and cards, many of them from children. (University Hospitals Birmingham NHS Foundation Trust. Used with permission of the Queen Elizabeth Hospital in Birmingham)

My friends say he fired three shots. The first went through my left eye socket and out under my left shoulder. I slumped forward onto Moniba, blood coming from my left ear, so the other two bullets hit the girls next to me. One bullet went into Shazia’s left hand. The third went through her left shoulder and into the upper right arm of Kainat Riaz.

My friends later told me the gunman’s hand was shaking as he fired.

In the year since that fateful day, Malala has undergone a recovery that is nothing short of miraculous. The bullet narrowly missed her brain, and doctors at Queen Elizabeth Hospital in Birmingham, England, where she was brought in a medically induced coma six days after the attack, marveled that she was able to stand within a week of her arrival. Malala underwent multiple surgeries and spent nearly three months in the hospital (which specializes in treating wounded soldiers), though mercifully it was found she had suffered no major permanent neurological damage. The ordeal did, however, solidify her will: “It feels like this life is not my life. It’s a second life. People have prayed to God to spare me and I was spared for a reason—to use my life for helping people.”

Click here to read about Malala’s life today »

Watch Class Dismissed, a New York Times documentary about Malala’s grassroots struggle, filmed in 2009:

Malala addresses the United Nations General Assembly on July 12, 2013, her 16th birthday: