Bryan Cranston, left, stars as customs agent Robert Mazur and John Leguizamo stars as his wisecracking partner Emir in Brad Furman’s "The Infiltrator." (Liam Daniel/AP)

In the 1980s, customs agent Robert Mazur posed as a money launderer with mob ties to get inside the Colombian drug cartels that were then bringing 15 tons of cocaine into the United States every week. As laid out in Mazur’s 2009 memoir “The Infiltrator,” the story of that dangerous, years-long mission was practically gift-wrapped for the big screen. Now filmmaker Brad Furman (“The Lincoln Lawyer”) has taken a stab at telling it, with Bryan Cranston in the title role.

As the movie begins, Cranston’s Mazur has yet to go undercover as a mobbed-up businessman. When we meet him, he’s playing a sleazy drug dealer, complete with horseshoe mustache and a tendency to hit on waitresses. Just as he’s about to make a big bust, something goes awry: The wire he’s wearing burns a hole in his chest. While Mazur still gets his guy, he also receives an offer from his bosses. With a wound like that, he can retire immediately, with full benefits.

His wife, Evelyn (Juliet Aubrey), would no doubt love that. After all, the pair has two young children, and Mazur’s typically not around.

Instead, he takes on a bigger, even riskier assignment. With the help of his wisecracking new partner, Emir (John Leguizamo, wonderful as ever), Mazur — now posing as entrepreneur Bob Musella — starts making friends with corrupt bankers, mid-level drug dealers and even members of Pablo Escobar’s Medellin drug cartel.

Diane Kruger, left, and Cranston in "The Infiltrator." (Liam Daniel/AP)

The movie aces the look and feel of the 1980s. Grainy footage shot in reds and yellows evokes the era as much as the cheesy synthesizer music and Mazur’s “Rocky” sweatpants. Cranston, meanwhile, is typically magnetic in the lead role.

Yet something’s missing. Although the movie is tense, it’s not the white-knuckle experience you might expect, with the most suspenseful scenes coming across as manufactured. Case in point: When a car inches along behind Mazur as he jogs down the middle of a neighborhood street, you might worry for his safety — if you weren’t so distracted by the perfectly good sidewalk he could run over to. Later, when a drug-dealing associate who works with Musella unwittingly crashes Mazur’s wedding anniversary dinner, the outcome is mind-boggling. The undercover agent ends up smashing a waiter’s face into a cake, to the horror of his wife. As a plot development, it’s less logical than an excuse to lob a grenade into Mazur’s marriage.

There are enough of such scenes that don’t ring true to distract from the ones that do. Mazur and an agent posing as his fiancee, Kathy (Diane Kruger), have zero chemistry, yet the danger of their mission is supposedly drawing them together in worrisome ways. One of Escobar’s underlings, Roberto (Benjamin Bratt), has just been double-crossed, yet he wastes no time treating Bob and Kathy like family.

If the movie isn’t always gripping, it’s nevertheless a worthwhile examination of the intricacies of undercover life. Mazur in no way appears to enjoy lying for a living. He’s no Jason Bourne — just a normal guy who wears short-sleeved dress shirts and plays Clue with his family for fun. He might succeed, if he doesn’t have a heart attack first.

He and Kathy also start to feel affection for the criminals they’ve cozied up to. The two feel especially guilty about using Roberto — a dangerous criminal, but someone who also knows how to throw a stellar dinner party. The movie’s most interesting takeaway is one it never fully investigates: Going undercover is risky business, but you also might make some great friends along the way.

R. At area theaters. Contains strong language, violence, drug use and sexual situations. 127 minutes.