“Detroit” is real life tragedy, drama and melodrama, a bloody slice of America’s prejudiced racial history.

The setting is the Detroit race riot of July 1967. The five days and nights of violence, looting and property damage were one of the largest urban uprisings of the 20th century. As a nation we still nurse festering wounds from the conflict. The film is imperfect, but for anyone who still harbors delusions about systemic racism and police-community relations, “Detroit” is an important and effective wake-up call.

By the time the Detroit riot ended, 33 blacks and 10 whites were killed, 1,189 people were injured and over 7,200 were arrested. It’s an expansive canvas for filmmaking. But director Kathryn Bigelow and writer Mark Boal (collaborators on “The Hurt Locker” and the Oscar-winning “Zero Dark Thirty”) follow their insightful stories of difficult U.S. police actions in Iraq and Afghanistan with a sharp study of ruinous domestic conflict on the home front.

They understand that the pandemonium on the streets of Detroit was only part of a larger, ongoing crisis. They keep their focus tight, re-creating a single horrifying event. In the form of you-are-there reportage, they examine the notorious “Algiers Motel incident.”

While the battle raged around them, a trio of white Detroit policemen searching for snipers seized a section of the Algiers Motel. For two hours, they used batons, rifle butts and death threats to beat and brutally interrogate 10 black and two white youths staying there. Having found no snipers or weapons, the police exited, leaving the dead bodies of three young black men in their wake.

“Detroit” returns to the scene of the crime, studying the mismatched characters in a room full of weapons and watching as various fuses burn ever closer to detonating the powder keg.

Bigelow has fashioned a formally daring film. Largely following a classic five-act story structure, it creates a nearly flawless blend of archival newsreel shots and cinematographer Barry Ackroyd’s intentionally archaic handheld footage.

It spends the majority of its 142-minute running time holding us hostage in enclosed spaces. The jittery, claustrophobic close-ups create an unrelenting sense of being imprisoned alongside the ensemble of characters. When they flinch in fright from their captors’ vicious threats or howl in pain and despair, it’s impossible to feel any less. Some critics of ”Zero Dark Thirty” misread it as depicting the CIA’s use of torture interrogation as crucial to hunting down Osama bin Laden. “Detroit” definitively establishes that Bigelow finds abusive questioning vile.

The film opens with the look and feel of a recruiting poster, welcoming viewers to a basic understanding of how black life in America culminated in gunfire and Molotov cocktails scarring the landscape of the nation’s fifth-largest city. With the colorful storytelling “migration series” paintings of the late African-American artist Jacob Lawrence, the opening narrates the mass movement of blacks from the rural South to the industrial North between World War I and World War II.

The new home was no utopia, with social and political setbacks different but hardly easier. When unemployment, poor education and housing, and entrenched prejudice fueling white flight from the urban core combined with police misconduct, the city’s black population exploded like a pressure cooker.

The trigger point here is a police raid on a popular unlicensed speakeasy where Vietnam veterans are celebrating their return home, a roundup to jail that is the final step too far. Here, as throughout the film, the facts and the look of the locale are spot on. “Detroit” is not a Black Lives Matter homily or an alternative version of history. It aims to hold as close to the facts on record as possible.

This would not add up to an accomplished, chilling and undeniably powerful piece of filmmaking if the cast gave hammy, actorish performances. Will Poulter faces a challenging role as Philip Krauss, a composite patrolman who shoots black suspects at the slightest provocation — or none at all.

Within the first minutes of the film, he has shot a fleeing thief who is trying to run two bags of groceries home. A police detective calls him a racist, and threatens to take him in on murder charges, but Poulter explains the shooting in calm, measured terms of Anglo-Saxon anxiety around frightening members of another race. He makes the despicable character utterly pathetic as well.

As Melvin Dismukes, a good Samaritan security guard at a nearby grocery store whom the police investigating the killings consider a prime suspect, John Boyega creates an upstanding guy without belaboring the point. And the Greek chorus of players who arrive on-screen toward the end express their individual forms of grief over their families’ suffering are deeply moving without over-milking sentimentality.

The film gives some stories unearned attention. I wish there had been less focus on the nightmarish suffering by Stax Records vocalist Larry Reed (Algee Smith) and his friend Fred Temple (Jacob Latimore). It rushes through the courtroom debates that the case developed years later. The motel’s two white visitors, Juli Hysell (Hannah Murray) and Karen Malloy (Kaitlyn Dever) get more attention than their underdeveloped characters seem to merit.

Perhaps there are too many issues and individuals for any of them to command center stage. In any event, “Detroit” is a solid, socially important and harrowing statement about American society. If it lacks a definitive ending, so does the ongoing story we are all living now.