If it weren’t for a heckling fan, Kumail Nanjiani might have never met his wife Emily V. Gordon.
In 2006, the “Silicon Valley” star was in the middle of a comedy act when Gordon shouted from the audience.
“I was like, ‘Are there any Pakistanis in the house?’ And Emily went, ‘Woohoo!’ And in real life I said, ‘You’re not from Pakistan. I would have noticed you,’” Nanjiani, 39, said in an interview on ABC News’ “Popcorn With Peter Travers.”
“I was just trying to help him out because everyone was dead silent in the audience,” Gordon told Peter Travers.
Nanjiani interrupted, “I was doing okay. People were laughing.”
“You were doing fine,” said Gordon.
Watch the full interview with Kumail Nanjiani and Emily V. Gordon from "The Big Sick" on ABC News' "Popcorn With Peter Travers" in the video above.
Nanjiani said he thought Gordon was cute and went to look for her after the show, but Gordon had already left because she was so embarrassed.
“Then a couple nights later, I ran into her and I was like, ‘You’re the girl that heckled me,’” said Nanjiani.
The ensuing conversation Nanjiani and Gordon had is portrayed in the film “The Big Sick,” which is out in theaters now. The movie, which Nanjiani wrote with Gordon, is loosely based on the first year of their real-life relationship and the complications they faced.
“My parents wanted me to marry a Muslim Pakistani girl, so they were setting me up -- or they were trying to set me up for that, and Emily and I had sort of fallen in love,” Nanjiani said. “And a few months into our relationship -- this sounds really heavy -- she was put into a medically induced coma.”
Nanjiani plays himself in the film, while the character Emily Gardner, which is based on Gordon, is portrayed by Zoe Kazan.
Gordon, who was later diagnosed with adult-onset Still's disease, became very ill and had to be hospitalized. While Gordon was in a coma, Nanjiani spent time with her parents in and out of the hospital.
“Obviously, the broad strokes of the movie are pretty accurate. It’s what happened. And the movie feels to us emotionally how it felt to go through that,” said Nanjiani.
While some scenes in the movie -- like the story of how they met -- are based on actual events, there are some subtle differences.
And in another scene, Nanjiani tries to impress Kazan’s character by writing her name in Urdu.
“The movie version of Emily is on to him immediately, like, ‘This is a move you’ve pulled on other people.’ The real version of Emily fell for it hook, line and sinker and thought it was incredibly charming and very exotic,” recalled Gordon.
“I remember when I thought of that move, and I was like, ‘Alright. This will help,’” said Nanjiani.
“And it did!” Gordon added.
Aside from their love story, Nanjiani and Gordon said they wanted to explore the theme of families, especially their own.
“Any time you fall in love with someone, they come with so much context. They come with how they were raised, their weird stuff from break-ups. And they come with a family,” Gordon said. “Whether or not they have a relationship or not, that’s still part of it.”
In particular, Nanjiani, who immigrated with his family to the U.S. from Pakistan when he was 18 years old, said he also wanted to show the struggle his parents had with holding onto their culture while embracing an American one.
“It’s very challenging for someone like my parents, you know, who leave their lives, come here in search of better lives for their kids, and then their kids choose to not lead the kind of lives that the parents wanted them to lead,” Nanjiani explained. “It’s very complicated. They sacrificed their lives for their kids, and then their kids a lot of time reject their culture.”
“The Big Sick” expands on this with the idea of arranged marriages, in which his parents also believe.
“It works for a lot of people, and that was another thing we wanted to show with the movie, to just portray it in the way that I understand it growing up, which was the system that works,” said Nanjiani.
Gordon was on set every day of the movie’s production, except for any kissing scenes, when Nanjiani requested she not be at the monitors.
“I’m just not an actress. I would’ve tanked this whole production ... and I also think it’s strange to have the two people who went through the event actually reenacting the event,” said Gordon. “And if you’re going to have someone play you in a movie, let it be Zoe Kazan. That’s my request.”