Something must be calling out to writer-director Peter Berg to keep making good movies based on awful true events, and having Mark Wahlberg star them. Berg’s two most recent films were “Lone Survivor” (Wahlberg on an Afghanistan battlefield) and “Deepwater Horizon” (Wahlberg on the BP rig that exploded in the Gulf of Mexico). In “Patriots Day,” a film about the bombings at the Boston Marathon in 2013, Wahlberg plays a homicide cop who’s temporarily in the dog house at work and, as “punishment,” is assigned to the humdrum job of Finish Line duty on the day of the race.

Wahlberg is Tommy Saunders, who becomes the hero of the piece. But Tommy is an amalgam, a character made up of the many different police officers who worked to save people and get the bad guys on that tumultuous day and the few days following it.

Berg opens the film with scenes of everyday normal life around Boston. His cameras peek inside the homes of Tommy and his family, of Watertown Police Sgt. Jeffrey Pugliese (J.K. Simmons), and of the story’s villains, Tamerlan Tsarnaev (Themo Melikidze), his younger brother Dzhokhar (Alex Wolff), and Tamerlan’s wife Katherine Russell (Melissa Benoist).

The cameras then cut over to Boston’s Boylston Street, right by the finish line, where police are calmly preparing for the annual crowds, and the crowds are excitedly gathering.

By the time the gun goes off signaling the beginning of the race, Berg has already established that the older Tsarnaev brother, a cold-hearted monster, is the one in charge, emotionlessly ordering around his clearly weaker-minded sibling. The film only looks at the race itself intermittently, but the other component put in place by Berg is the ever-present, quietly throbbing, subtle, and very menacing soundtrack. That goes on even as a winner crosses the finish line and, soon after, the brothers are walking through the crowd, one in a white cap, the other in a black cap, both of them carrying large bags.

Everyone watching this knows what’s going to happen, so the tension is already there, but the music makes it worse, and a half-hour in, when the first of two bombs goes off and all hell breaks loose, there’s an amazing switch from that quiet aural buildup to a terrifying and disconcerting segment that combines sight and sound. The sound of people screaming and crying and of sirens blaring cuts in and out. The visuals of people running and falling, and police trying to maintain order, seems to speed up and slow down at the same time. It’s total chaos, and it’s very convincing filmmaking. And it all happens even before the main story gets going.

That would be when it all turns into the big screen equivalent of a tense and exciting TV police procedural, one of the good ones, with convincing actors delivering believable dialogue. Kevin Bacon shows up as an FBI man who’s concerned about labeling the atrocity an act of terrorism, until pieces of evidence allow him to do just that. OK, John Goodman, as Boston Police Commissioner Ed Davis, doesn’t even come close to a proper Boston accent, and Wahlberg’s Tommy manages to arrive at so many locations you’d think he was cloned. But the film maintains an impressive balance of looking in on survivors, keeping tabs on the perpetrators, and watching the police, greatly aided by surveillance cameras, slowly and surely do their thing.

A big set piece involving a nail-biting shootout between the Tsarnaevs and swarms of cops in the Boston suburb of Watertown, and a smaller one, focusing only on words and facial expressions, between a police interrogator (Khandi Alexander) and Katherine Russell, are riveting standouts.

Although the idea of ending a film based on a true story with the real people who were involved in the incident can easily come off as a cliche, it works beautifully here. Berg definitely made the right call of including footage of Red Sox slugger David Ortiz making the brief, impassioned Fenway Park speech that gave birth to the phrase “Boston Strong” as a capper.

— Ed Symkus writes about movies for More Content Now.

“Patriots Day”
Written by Peter Berg, Matt Cook, Joshua Zetumer; directed by Peter Berg
With Mark Wahlberg, John Goodman, Kevin Bacon, J.K. Simmons, Alex Wolff
Rated R