How 'Moonlight' became the little film that could and made it to the Oscars Inside the indie film's historic journey to the Oscars.

 -- Perhaps no one is more surprised by the success of "Moonlight" than its director, Barry Jenkins.

The film is nominated for eight Academy Awards, including best picture, directing, editing and cinematography. Stars Mahershala Ali and Naomie Harris are also up for Oscars in the best supporting actor categories.

"We didn't make the movie with any expectations," Jenkins told The Los Angeles Times last month. "I remember being at Telluride and Toronto and getting this first inkling that people were seeing something that they didn't expect to see and, because of that, it was moving them in a way that they — and us — couldn't anticipate."

The coming of age story follows Chiron, "a young black man, from childhood to adulthood as he struggles to find his place in the world while growing up in a rough neighborhood of Miami," according to the official synopsis.

It was made for a mere $5 million and has already grossed almost $20 million at the box office and earned nearly unanimous praise from critics. It won a Golden Globe for best dramatic picture, and Jenkins made history as the first black person nominated for Academy Awards for best director, best screenplay and best picture in the same year.

How Jenkins and his production team were able to accomplish this could well become a primer for other filmmakers. Here's the road map to the Oscars for "Moonlight," the little film that could:

Jenkins created a specific story that could resonate universally

"I think if you create something that's distinct and unique, you'll get a genuine, a visceral reaction out of the person receiving it," Jenkins told ABC News' "Popcorn With Peter Travers" last month.

"It's not that the movie and its specificity is relatable to everyone. That's not what I found," he continued. "What I found is because Tarell [Alvin McCraney, the co-screenwriter] and I are two guys from a certain block, in a certain neighborhood, in a certain era and our moms went through a certain ordeal, somebody as far as Boise, Idaho, goes, 'My neighborhood's nothing like Miami, and yet I went through this thing, on this corner with my uncle and my mom.' It starts at our feet, and you can see how it relates to your feet."

The film doesn't pander to the audience

"I think it shows that it's one thing to invite an audience in, which I think we did. But once we did, we don't try to show them things we anticipate they need to or want to see," the director told The Los Angeles Times last month. "I do think audiences, at least with this film, respect that. I give it up for the audience because they have been willing to walk a mile in Chiron's shoes. I think they respect that I'm not trying to bring their shoes into my cinema."

The film strove for authenticity

Based on playwright McCraney's play "In Moonlight Black Boys Look Blue," the film is rooted in actual events, people and places. He wrote the play in the summer of 2003 while graduating from Chicago's DePaul University and losing his mother to AIDS-related complications. "I was very lonely," he told Out magazine. "I still feel very alone most of the time, and so I tried to figure out and put down as much of the memory that I could."

When Jenkins read the play, he recognized his own upbringing. Both men grew up in the same inner-city Miami neighborhood with mothers who succumbed to the crack epidemic of the 1980s and '90s. "It was definitely Tarell's story — but it was close enough that I could maybe still have one foot in emotionally, but at least that one foot would be hella personal," Jenkins told The Daily Beast. "Of course, there was no way to not put both feet in."

He ended up rewriting the play for the screen, putting some of his own story in it. And when it came time to direct it, he returned to the neighborhood where they grew up, even choosing the little boys who play Chiron and his friend Kevin from a Miami middle school similar to the ones he and McCraney attended. Directing the film, he told The New York Times, "was very visceral, like working an open wound."

Jenkins kept it in the family

Jenkins worked with six of his fellow film school graduates from Florida State University to make the film: producer Adele Romanski; her husband, James Laxton, the cinematographer; co-producer Andrew Hevia; actor Andre Holland; and editors Nat Sanders and Joi McMillon.

Like Jenkins, McMillon made history with her nomination — as the first black woman nominated for an Oscar in film editing.

"It shows that the warmth and love that we put into the film — myself, the crew and the cast — that people are responding to that," Jenkins told the press at the Toronto Film Festival.

The film got great reviews

Great reviews — like the one from The New York Times, headlined "Is this the year's best movie?" — certainly helped. The film's approval rating on Rotten Tomatoes is nearly perfect, at 98 percent, with an average rating of 9 out of 10.

The film had a strong opening

Those reviews, coming out of the Telluride, Toronto and New York film festivals, helped propel the film to a strong opening on Oct. 21, 2016. In just four theaters, the film grossed $413,175 its opening weekend. According to Indiewire, among indie releases over the last two years, it was second only to "The Revenant," which opened on a Christmas weekend.

The film got grass-roots support

Accepting the Golden Globe for best dramatic film, Jenkins told audience members and viewers at home, "All I have to say is, please, tell a friend, tell a friend, tell a friend. Much love."

That kind of approach has worked to publicize the film. After the Oscar nominations were announced, Jenkins told The Los Angeles Times, "It's been this very grass-roots thing. People see the movie, and they tell someone. I think these nominations this morning are just proof positive that enough people told a friend."

Timing is everything

"Moonlight" comes eight years after Jenkins' first film, the well received "Medicine for Melancholy," and a year after #OscarsSoWhite went viral, but he says the number of this year's Oscar-nominated films featuring people of color is not a reaction to the push for more diversity in Hollywood.

"Movies take a long time. This movie took three and a half years. It's great that they can all be framed in the way that you're seeing it now because of #OscarsSoWhite, but really what you're seeing is all these filmmakers who felt voiceless or felt this lack of presence amongst different kinds of storytellers and different kinds of story modes," he told The Daily Beast. "Those people took it upon themselves to create these stories, and now we've arrived at this moment because everybody else got fed up and created this uproar — and now the films exist to fulfill them, but they're not a response to the uproar."

Nevertheless, Jenkins was happy to tell ABC News, "The nominations this year reflect the world I live in."