Rana el Kaliouby co-founded A.I. startup Affectiva in 2009. But it wasn’t until 2016 that she gathered up the courage to say she wanted to be the company’s chief executive, despite the fact that she was already handling many CEO-level responsibilities.
Affectiva, which aims to “humanize technology” by teaching machines to interface human emotions, sprung from a project that el Kaliouby co-created with MIT Media Lab professor Rosalind Picard. When it was time for the startup’s official launch, “Part of me felt that I wanted to really be the CEO but I didn’t have the guts to do it,” says el Kaliouby. Instead, she served as Affectiva’s chief technology officer—a post she held for the next seven years.
“We’re women. We’re scientists,” el Kaliouby says. “We don’t have a lot of business experience, and we’re pitching a company about emotions. And often we’re pitching to older male investors, so that makes it really hard—yeah, definitely quite challenging, actually.” That conundrum in mind, Affectiva found a male CEO to help launch the company.
Sign up: Click here to subscribe to the Broadsheet, Fortune’s daily newsletter on the world’s most powerful women.
Three years ago, el Kaliouby was re-evaluating Affectiva’s business and saw its market opportunities changing. She approached her boss about becoming co-CEO to better address them. At first, he resisted. But the more el Kaliouby thought about it, the more she realized she was already effectively doing a lot of the CEO job, such as acting as the face of the company and running its tech team.
“He saw that I was extremely passionate. And he was also my mentor over the years and I learned a lot from him,” el Kaliouby says. “I remember I was on a train back from New York to Boston when he called me. He said, ‘You know what? I thought about this. I think you should become CEO.’ And I said almost, ‘No, no, no, I was joking.’ I almost reneged on the whole thing. I was scared.”
But she overcame that fear and said yes. So far, here years as a CEO have been “a great experience,” says el Kaliouby. “Definitely challenging and stressful but very fulfilling. And the company is in a much better place.”
In Fortune’s Trailblazer series, powerful women in business share formative stories about overcoming a challenge in their lives. Watch them all here.