Reshma Saujani is known for founding Girls Who Code and helping girls follow their passion. But despite encouraging risk-taking, Saujani herself followed a safe path—until 2010, when she ran for office against an incumbent congresswoman. In this exclusive excerpt from her new book, “Brave, Not Perfect: Fear Less, Fail More, and Live Bolder,” Saujani describes the first time she did something brave.
In 2010, I did the unthinkable. At the age of 33, never having held an elected position, I ran for U.S. Congress.
Up until then, even though it had been my dream from the time I was 13 years old to run for public office and effect real change, I had stayed safely tucked behind the scenes of politics. By day, I worked long, grueling hours in a big-name investment firm—a high-paying, glamorous job that I hated but stayed in because it was what I thought I was supposed to be doing. At night and in every spare moment on weekends, I worked as a fundraiser and organizer; these were all valuable contributions that had impact, but in my heart, I wanted to play big and do big things.
With every passing day, I became more and more miserable in my job, until I reached a moment of deep despair when I knew something needed to change. That was when I heard a whisper in the New York political community that the sitting congresswoman in my district was going to vacate her seat after 18 years to run for Senate. I knew this was my opening. I met with a few key people to ask what they thought, and everyone said enthusiastically that I should go for it. I knew how to raise money, I had good policy ideas, I had a good background story; although I had no experience personally running for office, the rest was there. For the first time in as long as I could remember, I felt fired up. I was finally heading toward the life of public service I’d always dreamed about, and there was no stopping me.
Sign up: Click here to subscribe to the Broadsheet, Fortune’s daily newsletter on the world’s most powerful women.
Then it happened. The congresswoman decided not to vacate her seat, which meant I would need to run against her if I wanted it. Suddenly, everyone who’d supported me and said go for it were saying, “Oh, no, no … you can’t run against her.” She was a venerable force to be reckoned with, and they said I didn’t stand a chance. Not only did I lose the enthusiastic support of the female party elite—they outright told me it wasn’t my turn and demanded that I back down.
By that point, I was in too deep to give up. Here was my dream, just inches within reach. I wanted this—way too much to turn and run away. Believe me, there were plenty of moments that I thought to myself, I must be nuts. But I went for it anyway. I knew this would be my one shot and that I’d regret it for the rest of my life if I didn’t take it.
To my surprise—and the surprise of a lot of other people—my race caught a lot of positive attention. Here I was, a young South Asian upstart who had never held public office, but people were listening and the campaign donations were flowing in. I went from tentatively hopeful to confident I would win.
But when push came to shove, it turned out that voters cared a lot more about my lack of experience than anyone thought. I didn’t just lose; I got clobbered, winning just 19% of the vote to my opponent’s 81%. What’s remarkable about this story isn’t that I ran for Congress. Or how stunningly and spectacularly I ended up losing, or even how I picked myself back up after such a public and humiliating defeat. What makes this story worth telling is the fact that when I ran for public office at the age of 33, it was the first time in my entire adult life that I had done something truly brave.
Adapted from BRAVE, NOT PERFECT: Fear Less, Fail More, and Live Bolder Copyright © 2019 by Reshma Saujani. Published by Currency, an imprint of Penguin Random House LLC