Any resemblance between The Hate U Give and your average teen movie evaporates about 20 minutes in, when 16-year-old Starr Carter, played by Amandla Stenberg, witnesses a police officer shoot dead her friend Khalil at point-blank range. By this stage, Starr’s father has already given her The Talk, the time-honoured ritual where African-American parents instruct their children how to behave if stopped by the police: be polite, stay calm, put your hands where they can see them. When their car is pulled over, Starr follows the drill. Khalil reaches for a hairbrush. The police officer thinks it’s a gun. That’s all it takes.

The Hate U Give is fictional, but barely. To see the stricken expression on Stenberg’s face during the shooting scene is to recall Diamond Reynolds, partner of Philando Castile, who livestreamed the aftermath of Castile’s 2016 police shooting from the passenger seat while he bled to death beside her. The victims’ names have almost become a mantra: Castile, Freddie Gray, Oscar Grant, Trayvon Martin, Tamir Rice, Eric Garner, Sandra Bland – all young African Americans killed by law enforcement, each an avoidable tragedy.

Their stories, among others, have fuelled the Black Lives Matter movement, and now we are starting to see them reflected in popular culture (Ryan Coogler’s Fruitvale Station, for example, dramatised the shooting of Oscar Grant). The Hate U Give is already the most visible product of this to date. Angie Thomas’s source novel has been a publishing phenomenon. The movie, directed by George Tillman Jr, could well follow suit, with its built-in following and a rising swell of critical acclaim, especially around Stenberg’s powerful performance.

After the shooting incident, neither she nor we fully recover. Filming that scene was hard, says Stenberg: “I had this understanding the whole time that this was real. Even though I personally have never experienced losing someone to police brutality, I understand it’s something real, and within black communities we feel the pain of that institutional racism. We grieve for the lives that we’ve lost. When Freddie Gray, Eric Garner, Sandra Bland were killed, my friends and my family cried for them.”

If ever an actor was destined to play Starr, it is surely Stenberg: it’s difficult to work out where the character ends and the actor begins. The Hate U Give follows Starr’s journey from passive witness towards outspoken activism, as she awakens to the inequalities and injustices around her. In real life, Stenberg is already an outspoken activist. Two years after her movie breakthrough as Rue in 2012’s The Hunger Games, she went viral with a self-made YouTube film called Don’t Cash Crop on My Cornrows, in which she raised an eyebrow at the appropriation of black style by white figures such as Miley Cyrus and Katy Perry. She has twice appeared on Time magazine’s annual list of 30 Most Influential Teens (she turns 20 this week). She co-authored the first major comic-book about and by a young black girl (Niobe: Her Name Is Death). In June she came out as gay via an Instagram post saying “OUT & PROUD”. And just this month, she wrote an op-ed for Teen Vogue in reaction to Christine Blasey Ford’s testimony, recounting her experiences of sexual assault. However, she wouldn’t necessarily label herself an “activist”.

I learned how to present myself to fit in Amandla Stenberg

“As the world shifts, the context and meaning of that word changes,” she says. “I just care about making work that I think speaks to people and helps them, and I like to be vocal about the things I do and don’t believe in.”

One of the 2 million-plus viewers of Stenberg’s YouTube video was Angie Thomas, who was making the final edits to her manuscript of The Hate U Give at the time. “Seeing her, all of a sudden I was like: ‘Wow! That’s exactly who I want Starr to be! This girl has everything I want Starr to have in her,’” Thomas remembers.

In turn, Stenberg was “kind of flabbergasted” when she read Thomas’s book. “So many of the details felt way too relatable to me,” she says. For example, Starr lives in a black neighbourhood, with its fair share of poverty and crime, but goes to a rich, predominantly white high school, whose students blithely sling about the same urban slang that she switches off in their company (“Slang makes them cool; it makes me hood,” she observes). In real life, Stenberg also grew up in a primarily black neighbourhood (in Los Angeles), going to a more privileged, primarily white school across town.

Point break: director Tillman on set with Stenberg. Photograph: Erika Doss

“I learned really early on what it feels like to be black in an environment in which no one looks like you,” she says, “And I learned how to be very intentional of how I presented myself in order to fit in.” Code-switching – that capacity to alter your behaviour according to the company you’re in – is something that people of colour are especially familiar with, she continues. “Because you have the cognisance that if you are completely transparent about who you are in a space that doesn’t accept you for who you are, it’ll be detrimental to your ability to succeed. That’s just a fact of growing up in a country that is still based on white institutions,” she says. It can work both ways, Stenberg points out: her mother is African American and her father is Danish. “He was one of the only white people in our neighbourhood, so what I was experiencing at school, he was experiencing at home.”

Angie Thomas’s own code-switching fed into the novel, too. Thomas attended a “mostly white, upper-class, private Christian university” in Mississippi, while living in a poorer, blacker neighbourhood. Her senior college project was a short story inspired by the shooting of Oscar Grant. “So many of my white classmates didn’t understand why people were upset over the shooting,” she says. “Some of them tried to justify his death: ‘He was an ex-con. What’s the big deal?’ And I remember being so hurt.” The short story eventually expanded into The Hate U Give. “So it was born out of that desire to not only show my peers and my neighbourhood: ‘I hear you, I get it, I feel these feelings, too.’ Also, a small part of me wanted to show my classmates at school why so many of us were hurt and angry and frustrated.”

As a result, The Hate U Give is a story that speaks to all sides. It is empathic to the African-American experience. (“I’ve had girls coming up to me crying, saying they feel so validated by the film,” says Stenberg). But it has resonated far beyond (“I’ve had 90-year-old white women telling me they connected with the book!” says Thomas). Beneath the racial specifics, Starr is a study in isolation. She becomes an outsider from both her communities, weighed down by pressures and anxieties nobody else understands.

Youth in revolt: Starr schools her friends. Photograph: Allstar/Fox 2000

“It’s always a constant battle when you’re making a film with African Americans or different cultures,” says director Tillman, but The Hate U Give’s themes are universal. “She’s a witness, and there are many people outside of African-American culture that have been a witness. And she’s got to stand up. Does she talk or does she not? There’s a mother and a father and they believe in their kids. From an external standpoint, everybody can relate to that.”

Tillman also felt an extra level of responsibility making this film, he says, invoking that now-familiar roll call of victims. Philando Castile’s death came halfway through the production process, and he was in contact with the families of Garner and Bland. Tillman had some experiences of his own to bring to the table, too. As a film student, he recalls being pulled over by the police and thrown in a cell for the night simply for not having the right paperwork. When he arrived in Los Angeles, not long after 1991’s infamous Rodney King beating, other African Americans taught him to fear being pulled over by the notoriously racist LAPD.

Tillman also got The Talk as a boy, “several times, from several family members. It came from my father, it came from my uncles …” In turn, he now finds himself giving The Talk to his 15-year-old son. “I’m very overprotective … you just don’t know. A lot of the things that happen with police brutality or shootings, 90% of the time it’s the wrong person; it’s the wrong thing that happened, it’s a mistake.”

Tillman made his name with 1997’s Soul Food, another African-American family drama, but, surprisingly, the films that spoke to him most as a teenager were Francis Ford Coppola’s 1980s teen movies: The Outsiders and especially Rumble Fish, starring Matt Dillon and Mickey Rourke. “I was amazed how artistic that film was, and it was made for kids,” he says. “That was my approach to this film: not to make a YA movie, because I think kids are much smarter than we think they are. They get things much faster than adults.”

Not a fair cop: Russell Hornsby, Regina Hall, Amandla Stenberg and Common. Photograph: Photo Credit: ERIKA DOSS/20th Century Fox

Thomas also had some unlikely influences. “I was a huge Harry Potter fan,” she says. “I know people will be like: ‘That’s a weird connection to make’, but those books were a defining moment, because they reminded me that as a young person I had power. They prepared us for what we now call ‘the resistance’, you know? We’re dealing with a real life Voldemort!” She barely needs to explain she’s referring to Donald Trump; he’s now He Who Does Not Need to Be Named.

Looking at young Black Lives Matter activists, or the anti-gun violence movement that sprang from the Parkland, Florida school shooting, the “resistance” is making its presence felt. That change is registering in Hollywood, too, and Amandla Stenberg could well represent a new definition of movie celebrity. “I’m part of a generation that understands the potential of the work that we do,” she says. “I’m lucky to be coming of age in an era where we’re tackling issues like sexual assault, where we’re upending the infrastructure of Hollywood that has existed since its creation.”

It would be a lot easier to keep my politics and my art separate Amandla Stenberg

Taking a stand is not without consequences. And the pushback can be empowering in itself, says Thomas. The Hate U Give has become one of the most challenged and banned books in recent US history. “It will probably surprise some people to know that I’m OK with that,” she says. “Because every single time it happens, there are young people who stand up and say: no.” She cites the case of Katy High School, in Texas, where the book was pulled from library shelves owing to its “pervasive vulgarity and racially insensitive language” in 2017. In response, 15-year-old student Ny’Shira Lundy organised a petition to reinstate the book. “And they did it. And she [Lundy] told me: ‘Now that I did that, I know I can use my voice to do even more. There are so many problems in our schools.’ She’s going to be calling them out.”

Stenberg has attracted criticism. For speaking up. For being too light-skinned to play Starr. And uproar is already building for her next movie, Where Hands Touch, where she plays a mixed-race German girl who falls in love with a member of the Hitler Youth. It’s a price she is prepared to pay. “Of course I think it would be a lot easier to keep my politics and my art separate,” she says. “But I don’t think that would make me happy and I don’t think it would mean that much. It’s your moral responsibility to be aware and to use your voice.”

The Hate U Give is in UK cinemas from Monday 22 October