At the risk of slapping a pat line on an admirably complex play, “The Recommendation” has a whole lot to recommend it.

The mastery of shifting tones that Jonathan Caren exhibits in this Old Globe world premiere would be a feat for any playwright, but it’s all the more impressive considering the piece is Caren’s first properly produced work.

His story of friendship, power dynamics and the perils of mutual back-scratching comes off at first blush like a sharp comedy, as we meet the two college roommates at the center of the action.

But once a third character enters the picture, “The Recommendation” becomes a provocative and at times brutally honest examination of how we calculate (or fail to) our social debt to others.

The narrator of this deftly acted memory play is Iskinder Iudoku (Brandon Gill), a middle-class striver whose Ethiopian-born father has sent him off to college with (proudly) a Jansport backpack and an admonition to listen to his heart.

Iskinder is a bit of a nerd, although still savvy enough to set up his own bit of llicit commerce in the dorms. His roommate, Aaron Feldman (Evan Todd), on the other hand, is the resident rock star – a personification of white privilege, with a family well-connected enough to wangle a birthday greeting for their son from the hockey great Wayne Gretzky.

Iskinder is both fascinated and repelled by the ease with which things come to Aaron, and admits a part of him hates this pampered party boy for it. Yet Iskinder ultimately can’t help tapping into Aaron’s world of affluence and influence as well.

There’s a memorable, telling moment in director Jonathan Munby’s turn-on-a-dime staging where Iskinder asks with amazement whether patronage and nepotism are really how the world works. Aaron replies impishly: “Well, it’s not not how it works.”

And yet Aaron is about to find out that even for him, there are limits. A chance traffic stop lands him in a jail holding cell (for reasons Caren doesn’t reveal right away), where he’s at the mercy of someone else who has the power to pull a few strings: A repeat offender named Dwight Barnes (Jimonn Cole).

What follows is a delicate, volatile interplay whose consequences end up echoing over a period of years, leading to a climax that has no less visceral impact for feeling slightly contrived.

Cole brings a mesmerizing mix of agitation and fabulization to Dwight, who claims to have endless famous friends but turns out to be a kind of judicial-system celebrity himself.

Gill nails Iskinder’s deep ambivalence about his bond with Aaron – really the soul of the play – and makes the character likable but certainly no saint.

And Todd earns laughs without ever pushing too hard for them – not easy given that his character occasionally borders on cartoonish.

There’s still a rough spot or two in Caren’s script, including a job dismissal that isn’t quite adequately explained; Iskinder also seems to drop out of his own story for an extended period in the first act.