We all know how “Deepwater Horizon “ ends. When the BP oil rig exploded in the Gulf of Mexico in 2010, 11 people died and millions of gallons of oil spewed into the waters and up against the Gulf shores in the worst environmental disaster in U.S. history.

The story of the aftermath, even 6 years later, is still being written. The how-did-it-happen is another thing, and the point of director Peter Berg’s intensely thrilling indictment of the greed and gross negligence that contributed to the horrific outcome.

Like the best true stories translated to film, this well-known ending works for Berg, not against him. He and writers Matthew Sand and Matthew Michael Carnahan know, as Ron Howard did with “Apollo 13” and James Cameron knew with “Titanic,” that it’s not about whether they live or they die or if the ship goes down or all are saved. It’s about the process and those decisions, big or small, corrupt or well-intentioned, that made this disaster inevitable.

Based on a New York Times article, “Deepwater Horizon’s Final Hours,” the film is about the crew – the men and women aboard just doing their jobs. Mark Wahlberg anchors as Mike Williams, a no-nonsense engineer, who leaves his wife (Kate Hudson) and precocious daughter at home for his dangerous job on the rig. An early scene with a school science project spells out exactly what he and his co-workers do and foreshadows what will go wrong. It’s the kind of set-up that on paper likely seems too cutesy, but here, it not only works, it actually builds tension rather effectively.

Sign Up and Save

“Deepwater Horizon” rises above expectations of what a movie like this is capable of at every turn – restrained where you think it might go too big or sentimental, and genuinely affecting when you think you’re gearing up for an eye-roll. Wahlberg may be an easy punchline, but he’s an underrated everyman and at his subdued best here. Even Hudson, in the generally thankless concerned-wife role, makes it seem worthwhile.

It’s a welcome step up for Berg, too, whose patriotic bombast and cliché romanticism overwhelmed “Lone Survivor.” Here, you really internalize the plight and rage of the workers, even though most people in the audience aren’t likely to ever set a foot on an oil rig.

When Kurt Russell’s crew leader Jimmy Harrell gets angry at the corporate brass for having neglected to perform some critical safety tests, you’re angry right along with him. The execs like Don Vidrine (a perfectly slimy John Malkovich) see only that they’re behind schedule and over budget and are cutting corners with abandon even as the rig seems to be faltering underneath them.

Jimmy and Mike eventually persuade them to run a few tests – a white-knuckle endeavor for everyone involved and, well, you can torture a statistic until it talks and it seems it might be the same for a pressure test. So they proceed, and, of course, things go spectacularly wrong.

It is a spectacle indeed – a must-see horror of fire and oil as this unbelievably massive structure explodes and crumbles around all the people we’ve gotten to know, like Gina Rodriguez’s Andrea Fleytas, Dylan O’Brien’s Caleb Holloway and Ethan Suplee’s Jason Anderson. It’s the rare film that can make you care about, and be able to tell the difference between, over a dozen characters.

I would have liked to have seen more of the rescue efforts from the Navy, more of the aftermath, but Berg keeps things focused, and the movie is likely better off for it. “Deepwater Horizon” achieves that impossible balance of being a tribute to the workers who both perished and survived that day and a searing critique of the rotten system that put them there in the first place.