Kathryn Bigelow worried she was the wrong person to direct “Detroit.”

The Oscar winner’s ripped-from-the-headlines drama, which opens nationwide on Aug. 4, burrows into one of the most painful chapters in American history. It centers on the Detroit riots of 1967, a response to decades of racial oppression and economic marginalization that exploded during a scorching hot summer and enflamed the Motor City. How could Bigelow — a white woman raised just ouside San Franicsco by middle-class parents and educated at Columbia University — understand and illuminate that kind of raw experience? Should she even try?

“I thought, ‘Am I the perfect person to tell this story? No,’” says Bigelow. “However, I’m able to tell this story, and it’s been 50 years since it’s been told.”

Ultimately, Bigelow opted to put her clout as the most famous female filmmaker in the world on the line, and convinced Annapurna, an indie production company with big ambitions to become a full-fledged studio, to back the risky picture.

“Detroit,” which debuted in limited release on July 28, is set against the backdrop of the race riots — or rebellion, as it has been rechristened by some academics and activists — but it is specifically focused on the killings of three black men that took place during that time in a nearby run-down motel. Known, rather clinically, as the Algiers Motel incident, the murders have modern-day echoes, mirroring the shootings of Michael Brown, Dontre Hamilton, Freddie Gray and other recent racially charged incidents of police violence.

JAKE CHESSUM for Variety

Shortly after midnight on July 25, 1967, Detroit police and National Guardsmen, responding to reports of a sniper in the area, savagely interrogated guests at the Algiers Motel, brutalizing them, threatening them with death and trampling over their civil liberties. By the time the evening was over, three of the men, all of them black, were dead, while nine others, seven black men and two white women, emerged severely beaten and scarred. They would never receive justice —the white police officers who were accused of murdering the black men would successfully plead self-defense.

Bigelow was familiar with the Detroit riots, but she hadn’t heard of the Algiers Motel killings until screenwriter Mark Boal pitched her on the idea of making a film. The pair previously collaborated on 2012’s “Zero Dark Thirty” and 2010’s best picture Oscar winner “The Hurt Locker,” where they developed an almost documentary-like approach to chronicling America’s recent wars in Iraq and Afghanistan. Bigelow says she learned of Boal’s script right after a grand jury declined to prosecute Darren Wilson, the officer who shot Brown. The ruling convinced her to move behind the camera again.

“With the events unfolding today, the story needed to see the light of day,” says Bigelow. “My hope is that a dialogue comes out of this film that can begin to humanize a situation that often feels very abstract.”

Algee Smith, a newcomer who plays the pivotal role of Larry Reed, an aspiring Motown singer whose life is upended by the killings, says Bigelow impressed him with her commitment to shining a light on police brutality.

“Here you have a white woman who’s telling this film about something that happened in the black community,” he says. “She feels so passionate about it. You have people in the black community who don’t even feel as passionate about it. But she said it gripped her heart and she couldn’t turn away from it.” All the same, Bigelow could face a backlash in the press and social media by those who question why the movie was directed and written by Caucasians.

Five decades after the murders in the Algiers, the intersection of race and criminal justice is still a flash point in American society, dividing us into Black Lives Matter and Blue Lives Matter camps. The political polarization of the country has calcified these factions along racial and party lines. Sixty-five percent of blacks support the Black Lives Matter movement, while 12% oppose it, according to a 2016 poll by the Pew Research Center. In contrast, 40% of whites endorse Black Lives Matter; 28% are opposed. Roughly two-thirds of white Democrats express at least some support for the Black Lives Matter movement; only 20% of white Republicans back its goals.

That means that “Detroit” will be facing fierce headwinds as it tries to foster the kind of debate that Bigelow aims to inspire. Moreover, the film was conceived in a very different political environment from the one in which it is being released. President Barack Obama often used the shootings of young black men as moments to teach understanding, reminding Americans that Trayvon Martin could have been his son. His successor, Donald Trump, has stated he doesn’t understand the term “black lives matter” and has aligned himself fully with police, accusing their critics of inciting violence. The difference in approach could not be starker.

JAKE CHESSUM for Variety

“It was certainly unanticipated,” Bigelow says in reference to Trump’s victory. “Film is a lumbering beast that doesn’t always move as nimbly as you want.”

In an interview with Variety at the Greenwich Hotel in Manhattan on a stiflingly hot July morning, Bigelow is unfailingly polite, softly apologizing for asking the staff to turn down the overhead jazz music so her words won’t be drowned out. She’s also somewhat tentative, pausing frequently between words, speaking in quasi-academic terms, deflecting more personal questions, all while maintaining a ramrod posture that would put the most seasoned yogi to shame.

By her own admission, selling a movie is not something that comes naturally to her. You can imagine she’d rather be filming in Middle East hot spots as she did for “The Hurt Locker” and “Zero Dark Thirty,” or trying to catch the ultimate wave a la “Point Break.”

Of course, the last time Bigelow was beating the drum for one of her works, she became embroiled in a bruising political scandal. “Zero Dark Thirty,” which included sequences of CIA agents using enhanced interrogation techniques as they searched for Osama bin Laden, was slammed as pro-torture. Social critic Naomi Wolf went so far as to compare Bigelow to Nazi propagandist Leni Riefenstahl. Bigelow hit back at those claims, writing in the Los Angeles Times that “depiction is not endorsement.” At the same time, Republicans in the House and the Senate claimed that the Obama administration improperly provided Bigelow and Boal with classified information to create a more flattering portrait of their efforts to kill the terrorist leader. Their threats of a congressional investigation ultimately were dropped.

Given the outrage that greeted “Zero Dark Thirty,” Bigelow might be forgiven if she had choosen a romantic comedy as her follow-up. But she insists she’s not worried about popping up in op-ed pages and nightly news takedowns again.

“My own personal concerns are at the service of the importance to tell the story,” she says. “I’m compelled to make emotionally, socially and politically challenging pieces. That’s what intrigues me.”

With a $30 million budget, “Detroit” represents a bold bet for Annapurna, the indie studio backed by Megan Ellison, the daughter of billionaire Oracle founder Larry Ellison. The production company financed “Zero Dark Thirty,” along with critical favorites such as “The Master” and “American Hustle.” But those films were released by other studios. “Detroit” is the first picture Annapurna is rolling out itself through its newly launched in-house marketing and distribution arms. (Ellison, notoriously press adverse, declined multiple interview requests for this story.)

Instead of releasing the film at the height of Oscar season, when it might try to ride awards buzz to box office gold, Annapurna is bowing the movie in the summer as a counterprogramming move. It’s a time of year known for superhero pics and escapist fare, not thought-provoking dramas about race relations in America. Even the “Detroit” creative team seems skeptical about the film’s commercial prospects.

“It’s a tough movie,” admits Boal. “The movie is challenging to watch. We’re in a difficult spot in the world right now, and I’m hopeful that audiences will respond to the challenge that the movie poses and appreciate not being talked down to.”

In male-dominated Hollywood, Bigelow is the exception to the rule. She is the only female filmmaker ever to win a best director Oscar and one of only four women even to get a nomination. It’s not just a lack of awards attention; female filmmakers are given few chances to ply their craft. Last year women comprised just 7% of all directors working on the top 250-grossing films domestically, a 2% drop from 2015, according to San Diego State’s Center for the Study of Women in Television and Film.

JAKE CHESSUM for Variety

“It’s a travesty,” Bigelow says. “I feel like it’s trending in the right direction, but it’s painfully slow, and where’s that inequity coming from? That’s a big and complicated sociological question.”

Despite the bleak numbers, she argues there are reasons to be optimistic. She name-checks Ava DuVernay (“Selma” and the upcoming “A Wrinkle in Time”) and Kimberly Peirce (“Boys Don’t Cry”) as female filmmakers she admires, and says she’s “thrilled” that director Patty Jenkins has scored blockbuster success with “Wonder Woman.” She confesses that she hasn’t had time to see the comic-book movie.

“I’ve been so busy, but I want to,” she says, sheepishly hiding her head in her hand.

Bigelow herself has been approached about big-budget comic-book movies, and indeed, she says she has been offered major mainstream films. Former Sony chief Amy Pascal publicly stated that she urged her to shoot a Bond film. So far, at least, Bigelow’s not interested in taking the plunge.

“Those opportunities are out there, and I’m grateful,” the director says. “I’m just more drawn to a journalistic aspect of film. That opens up very specific avenues as opposed to more comforting avenues. It’s a responsibility I’m excited to pursue, whereas something that has less content is less compelling to me.”

In the end, Bigelow believes that her greatest contribution to the cause of promoting women behind the camera is the sheer fact that she’s working at a high level.

“I am, hopefully, making the impossible seem possible,” she says.

Her work has won her admirers and loyal collaborators. Anthony Mackie, who appeared in Bigelow’s “The Hurt Locker” and has a supporting part in “Detroit,” says the director thrives on bucking conventions.

JAKE CHESSUM for Variety

“She loves to go against what people expect,” he says. “In her career, she hasn’t let her physical appearance, her race or her sexuality define the type of films she makes.”

Bigelow had been working for decades before she picked up an Oscar, but she was seen as more of an anomaly than an auteur. She was a female action director, bringing a certain kineticism to submarine thrillers (“K-19: The Widowmaker”), heist adventures (“Point Break”) and horror pics (“Near Dark”), genres that were typically the purview of male filmmakers.

“The Hurt Locker” — which won multiple Oscars, including best picture, director and original screenplay — catapulted her onto the A-list. The exploration of soldiers tasked with defusing bombs in Iraq put a human face on a conflict that had been shoved off the front pages. It also marked a shift in style, away from her glossier early work to a more verite approach to moviemaking. “The Hurt Locker,” with its constantly moving handheld camera, had a documentary-like intensity that galvanized Bigelow.

“It opened my eyes to a more journalistic style of filmmaking, and when I say that I mean informational,” she says. “It attempts to bring you, the viewer, to a place that you know very little about.”

That ambition is pushing Bigelow to pursue projects outside the film space. Last spring she debuted “The Protectors: Walk in the Ranger’s Shoes,” an eight-minute virtual reality documentary about the efforts of rangers in Garamba National Park, in the Democratic Republic of the Congo, to stop poachers from killing elephants for their ivory. She believes the medium could be used to tell more stories that encourage social and political activism, and she’s interested in using virtual reality to dramatize the issue of climate change.

“The purpose would be to create empathy for this problem,” she says. “That could move the needle.”

JAKE CHESSUM for Variety

Before Bigelow tackles melting icebergs and a warming planet, there’s “Detroit.” And so the director found herself camped out last summer on a set in a Boston suburb, dramatizing the hours of verbal and physical abuse that the men and women had to endure that night at the Algiers Motel.

“We were all operating on a precipice,” says Will Poulter, who plays one of the police officers interrogating and beating the motel guests. “It was three weeks in a sort of hell house.”

Bigelow shot the majority of the film and all of the Algiers sequences in chronological order. She wanted her actors to experience what it might have felt like to be tortured and pummeled with racial epithets for hours. Using a style she first adopted with “The Hurt Locker,” she deployed three or four cameras at a time, keeping them in constant motion around the actors. Bigelow preferred to light the entire set to give the performers more flexibility to move around. She didn’t block a scene for the camera by plotting out a series of close-ups and wide shots, instead filming everything in a few takes to keep the emotions as raw as possible.

“After two or three takes, I have it,” she says. “It starts out really rich, spontaneous and honest, and then it starts to feel sometimes less honest. It’s very live. There’s not a lot of downtime.”

The approach can take its toll on the performers. Smith and the other actors playing motel guests were lined up against the wall for days on end, screaming for their lives while having racial slurs hurled at them.

“We were breathing so hard and yelling so much you’d get light-headed and feel like you were going to pass out,” Smith recalls.

At one point Poulter was so upset about the cruelty he was reenacting that he broke down crying. He had to take a few minutes away from the set to regain his composure.

“It was incredibly difficult to inflict that sort of racially motivated and hateful behavior against people that I had love and respect for,” Poulter says.

JAKE CHESSUM for Variety

Yet the performers also felt a sense of responsibility to their real-life counterparts. John Boyega, the “Star Wars” actor who plays a security guard who tries to mediate between the motel guests and the police, would often remind his castmates of the stakes.

“While those boys were on the wall, I’d walk past them and tell them to stay in it, stay in your character, stay in the zone,” he says. “This is about real people, so you’re handling a fragile egg, and it requires a commitment.”

What emerges is punishing to watch. “Detroit” is a film without a moral victory. Innocent people die. Murderers go unpunished. Good men and women are left to pick up the pieces. Some are unable to move on. In a coda to the picture, Smith’s character, Reed, gives up singing professionally and retreats from the world.

“Each individual processed the event in their own way,” says Boal. “Some people went on with their lives and thrived, and some people never recovered. In some sense this is a survival story and whatever the opposite of that is.”

It would be easy to see “Detroit” as a profoundly pessimistic work. The same racial tensions that tore apart the city in the late ’60s reverberate today, threatening the fabric of society. Not as much has changed as we might hope. Race may be the third rail in American life, but whereas countries such as South Africa have created truth and reconciliation commissions to deal with their segregationist past, Americans have trouble talking frankly about prejudice. For Bigelow, information is power.

“I always feel that the purpose of art is to agitate for change, but you can’t change anything if you’re not aware of it,” she says.

There’s a quote from Martin Luther King Jr. that Bigelow references during our interview on that July morning: “A riot is the language of the unheard.” With “Detroit,” she is giving some of the men and women who were oppressed, marginalized, beaten and killed during that chaotic night in 1967 at the Algiers Motel a voice.