Patriots Day, Peter Berg’s new thriller that recreates the 2013 Boston Marathon bombing and the ensuing manhunt that followed it, is a surprisingly oblique, morally ambiguous movie from a typically straightforward filmmaker. Patriots Day takes an unexpectedly cynical view of the chaos, rash decision-making, and bureaucratic infighting that followed the bombing—the question is whether that was Berg’s intended message. For its grim 133-minute running time, the movie celebrates the men on the ground who helped bring the bombers to justice, but it’s the glimpses of something more complicated than jingoism that really linger.

The scene that best illustrates this dichotomy comes late in Patriots Day. As the search for one of the bombers, Dzhokhar Tsarnaev, intensifies, his brother’s wife Katherine (Melissa Benoist) is brought in for interrogation on her connections to the case. As she asks for a lawyer, protesting that she “has rights,” her steely interviewer (Khandi Alexander) tuts, “Honey, you ain’t got shit.” It’s a Hollywood line intended to provoke a big cheer from the audience, despite its queasy legal undertones. But the film presents it as just that—a cheesy line. The questioning goes nowhere, and the interrogator exits with a shrug; as the movie notes in its post-script, Katherine was never charged with any crime. Patriots Day is filled with this kind of bluster, but the film’s most compelling moments serve to undercut it.

Working against those more interesting themes is the man at the center of the movie, Boston Police Sergeant Tommy Saunders, a fictional character invented to serve as the audience’s eyes and ears at every major turning point of the attacks. He’s played by Mark Wahlberg, the polestar of Berg’s new genre of true-life storytelling who has played the mouthy heroes at the center of Lone Survivor (2013), Deepwater Horizon (2016), and now Patriots Day. Unlike those other films, Wahlberg’s character in Patriots Day didn’t really exist, and he often comes across as a bundle of screenwriting clichés. He’s nursing a bum knee and was recently demoted due to insubordination, but somehow is on first-name terms with every cop, uniformed or otherwise, in the city.

When the film is focused on Saunders, as it mostly is, it feels like a straight recreation of a traumatic event that occurred less than four years ago. Berg largely does well to avoid sensationalizing the 2013 bombing, which killed 3 and wounded 264 others, and the subsequent manhunt that claimed the life of a police officer. At no point does Patriots Day feel like a glitzy action movie or a gory piece of horror. The violence of that day is not lingered on, outside of an effort to make its victims feel like real people by depicting snippets of their lives beforehand.

Wahlberg, for his part, can’t help but make Saunders feel like a bit of a stereotype; he’s a ball-busting, short-tempered movie cop in a film that’s otherwise seeking nuance. Saunders, it seems, is supposed to stand in for the generally lovable, belligerent Boston spirit that prevailed in the days after the marathon, and Berg drills that point home far too many times. There are bits that work—in the immediate aftermath of the bombs, Wahlberg successfully communicates how angry and shaken Saunders is, rather than switching into cool-and-collected hero mode. He does a decent job selling the trauma, but once his hefty attitude returns, Patriots Day snaps back to severe unreality.

That’s too bad, since the film is most fascinating when it faithfully conveys the confusion of the days after the bombing, and the pile-up of differing opinions and clashing egos. The FBI, led by by-the-book agent Richard DesLauriers (Kevin Bacon), takes over the case, recreating the blocks attacked with pressure-cooker bombs inside a gigantic warehouse and combing through surveillance videos for clues. Boston Police Commissioner Ed Davis (John Goodman), Massachusetts Governor Deval Patrick (Michael Beach), and Boston Mayor Thomas Menino (Vincent Curatola) gather there to offer their own guidance on the case. Saunders is present too, for some reason, mostly providing expertise on the businesses around Boylston Street.

The thorny, mucky, civil-liberties debates that played out during the manhunt are the best parts of the film. Berg accurately shows DesLauriers agonizing over whether to release the pictures of the Tsarnaev brothers gleaned from surveillance cameras before he’s fully substantiated that they’re the bombers; his hand is eventually forced by a leak to the media. That sets into action the series of events that led to a deadly shootout with the Tsarnaev brothers in Watertown (J.K. Simmons plays a police sergeant there). Berg is wise to delve into the utter chaos of that manhunt, which included a brief, informal declaration of martial law and a bizarre, bloody standoff with the brothers that saw them lobbing pipe bombs at cop cars.

It’s bedlam, in other words—total disorder and madness, the kind of violence and fear that terrorism is intended to provoke, even from those trying to stop it. The Boston PD’s efforts to capture the Tsarnaev brothers is justly depicted as heroic, but it’s the crazed decision-making, the random chains of events, and the empty, angry posturing that stick out as most worthy of analysis. If Berg had dug deeper, he could have had a great film on his hands; as it stands, he’s delivered a rote, but occasionally thought-provoking, misfire.