Read: How Hollywood became obsessed with de-aging its stars

Enter Bad Boys, his one remaining movie brand (Men in Black was spun off without him last year, to little success). Bad Boys for Life comes 17 years after his last go-round as Detective Mike Lowrey in Bad Boys II, and one could be forgiven for thinking fan interest in his high-octane, R-rated antics has waned. Both prior Bad Boys movies were directed by Michael Bay and specialized in gleeful spectacles of violence and profanity, as vice cops Lowrey and Burnett (Martin Lawrence) tore up the streets of Miami in pursuit of drug dealers and gangsters. Bad Boys for Life still has plenty of car chases and shoot-outs, but Bay is no longer the director (he’s been succeeded by the Belgian filmmaking duo Adil El Arbi and Bilall Fallah) and the story line is a nakedly emotional one of Lowrey grappling with his age.

As the movie begins, Lowrey’s wiseacre partner Burnett is getting ready to retire and looking forward to home life after the birth of a grandson. Early on, Lowrey is shot by a mystery assassin and spends months in the hospital recovering; one of the film’s cutest moments is when Burnett carefully applies black hair dye to a comatose Lowrey’s graying beard, knowing his partner isn’t ready to look his age. Once Lowrey is back on his feet, he struggles to adjust to new tech-heavy methods of policing, younger colleagues, and the undeniable truth that he’s lost a step; it’s vulnerable stuff from an action star long known for his energy and athleticism.

Smith reportedly had a strong hand in crafting the film’s story, and the result is something that cleverly blends pathos into all the absurd action, something I wouldn’t have thought possible in a Bad Boys movie. Though Smith’s usual brand of jokey patter was present even in tired fare like Suicide Squad and Aladdin, it felt aimless, a familiar distraction in an overstuffed blockbuster package. In Bad Boys for Life, his chemistry with Lawrence is so genuine, and the nerviness of Lowrey (one of Smith’s most antiheroic characters) makes for real tension as he butts heads with Burnett over his own fear of mortality.

Then there’s the final twist: that Lowrey’s mystery assassin is in fact a long-lost son (played by Jacob Scipio) who was raised to hate his father. In their final battle, Lowrey refuses to kill his child, instead appealing to him emotionally and trying to make up for his son’s lost youth. It is, without hyperbole, almost the exact same conclusion as Gemini Man, except in that film, Smith was pleading with his clone. In both cases, the pathos of the climax stems from seeing Smith symbolically grapple with his past; in his performances it’s easy to detect some regret over the persona that made him an action hero for so long, leaving his career muddled as he begins to age out of the genre.