The actor Mark Wahlberg was supposed to be aboard one of the planes that crashed into the World Trade Centre on 9/11, but a scheduling change meant that he fortuitously ended up missing the doomed flight.

Some years later, in an interview with Men’s Journal, he mused on what might have transpired had he actually taken the flight. “If I was on that plane with my kids, it wouldn’t have went down like it did,” he said. “There would have been a lot of blood in that first-class cabin and then me saying, ‘OK, we’re going to land somewhere safely, don’t worry'."

The quote goes some way towards explaining Wahlberg’s strangely self-aggrandising role in his new movie, Patriots Day. The film is based on the events of the 2013 Boston Marathon bombings, in which the Tsarnaev brothers detonated pressure cooker bombs close to the finish line, killing three, and injuring hundreds more.

The film, directed by long-time Wahlberg collaborator Peter Berg, professes to be a painstaking reconstruction of the fateful day’s events and the city-wide manhunt that followed in the four days afterwards. Berg is clearly intimately familiar with the documentary evidence and source material, and is keen to impart his diligent research to the audience. Characters, locations, and events, for the most part, are depicted with impeccable detail. Perhaps most memorably, the film eerily intersperses actual CCTV footage of the bombers into key scenes, blurring the lines with reality.

But for a movie that has taken such great pains to be authentic, and exhaustively consulted victims, law enforcement professionals, witnesses and investigators, Wahlberg’s casting defies reason. His character Sgt Tommy Saunders is a fictional composite character who becomes the linchpin for the entire film. He is everywhere.

At every key juncture of the film, Saunders miraculously appears. He’s at the finishing line when the bombs go off. He helps the victims and directs the first responders. He maps out Boston for the FBI. He instigates the witness interviews. He responds to the Tsarnaev brothers’ carjacking victim at the gas station. He’s involved in the Watertown gun battle. And, finally, he has his gun squarely aimed at the younger Tsarnaev, as he emerges from hiding under the boat.

If this film is a testament to the bravery of Bostonians, as it claims to be, then why the need for a make-believe hero to take so much of the credit? It is difficult not to see this as a vanity project for Wahlberg.

Wahlberg’s fictional composite character becomes the linchpin for the film, despite the fact it prides itself on being as authentic as possible

This is particularly troubling when key heroic figures from the actual events have been completely neglected, such as Officer Dennis “DJ” Simmonds. Injured by a hand grenade during the waterfront shoot-out, he eventually succumbed to his injuries almost a year later. He is neither portrayed nor even mentioned in the film.

This is not the only creative licence taken. For a film that claims to rely so heavily on the documentary evidence, the narrative is riddled with inaccuracies.

For example, in a scene shortly after the bombings, the two brothers are seen watching news coverage of the event from their apartment. Tamerlan’s wife, Katherine Russell, carrying their infant, interrupts them to complain that Dzhokhar has bought the wrong milk from the convenience store. After a brief argument between the brothers, Tamerlan sends his brother out to exchange the milk. The film then cuts to actual CCTV footage of Dzhokhar rushing into the Whole Foods store to swap over the milk.

In reality, Tamerlan actually drove his younger brother to the store and waited in the car outside while Dzhokhar bought the milk, realised he had made a mistake and promptly returned inside to exchange it. Russell was not present – and neither did she interrupt the brothers’ viewing of the news coverage to complain about the milk. I’m not sure why Berg chose to alter this episode. It might seem fairly inconsequential – but may have something to do with the desire to show Tamerlan’s wife as having prior knowledge of the bombings. And her depiction is certainly the most problematic in the film.

A later interrogation scene shows Russell as aloof and intransigent, refusing to answer questions from an unspecified government agency. Instead, Russell demands a lawyer, stating she has rights, to which the interrogator replies: “You ain’t got shit, sweetheart.”

In reality, Russell’s real lawyer insisted that his client was very cordial and cooperative with investigators, speaking openly with them on more than eight occasions. To date, Russell has not been charged with any crime. But Berg seems to have made up his mind about her guilt.

Making a film about a recent well-known tragedy cannot be an easy undertaking. There will always be questions around timing and decorum, or the tension between remaining respectful to the memory of victims and survivors, and the commercial exploitation of tragedy. On balance, Patriots Day negotiates these challenges fairly successfully. Berg has crafted a tense thriller that manages to brilliantly document what happened, capturing the horror of the bombings, as well as the forensic investigation and manhunt in its aftermath.

But crucially, there is almost no introspection on the how or why. Instead, in the end, the audience is only left with Wahlberg’s cheesy jingoistic epilogue, to provide a soothing panacea to their ruptured worldview, and desperately restore some sort of moral clarity in the wake of what they have just witnessed: “What I saw today? Good versus evil, love versus hate. There’s only one weapon you have to fight back with, it’s love. You wrap your arms around each other, I don’t think there’s a way they could ever win.”

Perhaps I am being too harsh. Perhaps that is the point of making these sorts of films.

‘Patriot's Day’ is out now