Director Marielle Heller was introduced to Phoebe Gloeckner’s novel “Diary of a Teenage Girl” by her sister, while Alexander Skarsgard learned about it from “30 Rock” star Jack MacBrayer. These were some of the revelations at a Q&A following a screening of the film for SAG members held last week in Hollywood.

Heller’s film adaption of “Diary” hits theaters this week, with British actress Bel Powley playing Minnie Goetze, a teenage girl growing up in 1976 San Francisco who embarks on an affair with her mother’s boyfriend, Monroe (Skarsgard).

“My sister gave me the book as a Christmas present eight years ago,” revealed Heller. “She’d read it and loved it and thought I’d enjoy it too. It kind of sparked an obsession for me, and I stalked the author and her agent for many months until I got the rights to adapt it, first into a stage play.”

That 2010 Off Broadway production actually starred Heller as Minnie. “I was playing a lot of teenagers at the time in theater, and none of the roles were actually feeling authentic to me,” Heller said. “When I came across Minnie, I wanted her story to be told.”

After workshopping the film script at the Sundance Labs, Heller got financing for the film and cast British actress Powley as Minnie — the movie marks Powley’s first American movie.

“I was sent it by American agent, who I’ve been signed to for years and never booked anything,” Powley revealed with a laugh. “I was just so blown away. I’d never read such an honest depiction of what it feels like to be a teenager. I’d never done this before, but I tagged an extra bit onto my audition tape and said these are the reasons I’m so passionate about the project, please don’t think I’m crazy and please have a conversation with me.”

Quipped Heller, “I bet your agents love you now.”

For Skarsgard, the script came through “legendary actor Jack McBrayer,” who used to be his neighbor. “He said, ‘My friend Mari wrote this script, she’s really smart, it’s really good, you should read it,’” said Skarsgard. “You should always trust Jack McBrayer.”

Skarsgard, who joked his preparation consisted of “growing a mustache,” added he was intimidated by the idea of playing Monroe. “I was terrified by the character, which is always a good place to start. How do you make this interesting and layered and make this relationship mean something? How do you play someone so much older and should be responsible and mature and make sure it doesn’t feel too repetitive or predatory? Because that wouldn’t be interesting for an hour and 40 minutes.”

In its depiction of Minnie’s sexuality, the film contains some graphic love scenes between the two actors. Powley revealed that Skarsgard is actually her first on-screen kiss, joking, “So I really dove into the deep end there.” She added, “I feel like the way that we wanted to present the sex in the film was through a really honest lens. A lot of times sex is really hot and glamorized, and in real life, sex most of the time is really weird and awkward. Especially as a teenager. So it was comforting to me we were presenting something honest and true.”

Shot in 24 days all over San Francisco, the film premiered earlier this year to eager reviews at the Sundance Film Festival. It has since played festivals around the world, and Heller noted she’d been thrilled by the positive reception. “I made this movie thinking possibly it was for a very select group of women,” she said. “To see it affecting people around the world, it was more than I could have hoped for.”