PURE Theatre’s first musical production, Jason Robert Brown’s The Last Five Years, is a pretzel-shaped sort of romance: a chronologically twisted account of the relationship between a young novelist, Jamie Wellerstein (David Mandel) and his struggling actress wife, Cathy Hiatt (Emily Wilhoit).

Imagine a star-crossed lover’s tale unfolding along inverted, parallel paths. We hear the story sequentially, beginning to end, from Jamie’s perspective and in reverse — divorce to first date — from Cathy.

Brown’s musical neatly subverts the familiar progression that sends the audience home with a happily-ever-after payoff. Instead, The Last Five Years becomes a love story about missed opportunities with a wedding in the center.

And it’s only there — when Jamie and Cathy exchange vows — that the two characters share the stage. The marriage appears all the more fragile when the ties that bind stand revealed in this state: unraveled at their extremities.

Mandel and Wilhoit give this elastic tragicomedy a steady heart and soul.

Mandel’s Jamie has enough chutzpah and charm to render Jamie’s ambition credible and to highlight the growing rift between his literary celebrity versus Cathy’s frustrated goals.

Jamie even allows himself the distraction of a romantic impulse now and then. In “The Schmuel Song,” which relates the story Jamie has written for Cathy as a Christmas gift, Mandel shines as a romantic lead. It’s a funny, heartfelt moment.

Yet almost from the start, Jamie’s rising star has brought along a tide of temptingly attractive women. Jamie’s not quite confessional, “Nobody Needs to Know,” is Mandel’s most tragic and moving number. It’s the apex of Jamie’s narcissistic isolation from Cathy, and Mandel makes you want to throttle Jamie for being so wretchedly flawed, so human.

For her part, Wilhoit’s Cathy consistently places their relationship at the center of her life, even when doing so comes off less like an emotional bond than an escape from her stalled career.

The sublime grief of “Still Hurting,” which opens the show, is Wilhoit’s jewel: elegiac, lofty, and tender. Here she sets the emotional bar high for the rest of the show.

Cathy’s audition sequence, “Climbing Uphill,” is a hilarious glimpse at theatrical cattle-calls. Wilhoit’s frantic, kinetic overload of self-doubt and fragile hope infuses this verbal cascade with humor and humility. Keyboard accompanist Eric Johnson, who rejoins the production, relentlessly drives this number forward.

The Last Five Years is a theatrical roller coaster ride, but it’s a roller coaster with a heart.