The life story of dancer/choreographer Vaslav Nijinsky, including his relationship with ballet impresario Sergei Pavlovich Diaghilev, has been adapted to the stage many times before, but rarely has the focus been placed upon Diaghilev himself. That, however, is the primary focus of Tony Award-winning playwright Terrence McNally’s newest play, “Immortal Longings,” which recently premiered at Zach Theatre and runs through July 14. (It has previously been staged in a different form under the title “Fire and Air.”)

“Immortal Longings” is prime McNally, combining an interest in history with in-depth explorations of human relationships (particularly same-sex relationships) and a quest for human connection through art and beauty. In Diaghilev, the playwright has found perhaps his ultimate subject — a gay man who played a crucial but sometimes overlooked role in the history of Western art, tormented by inner demons and crippled by his own jealousies.

Zach’s production has found perhaps the perfect Diaghilev in Steven Epp, who combines madcap comedic timing and a deadpan ability to throw off scathing one-liners with a sense of all-consuming emotional and physical pain. One would be hard-pressed to say whether Epp’s performance is mostly comedic or dramatic, a testament to his strength at portraying both sides of the character.

>> RELATED: Stonewall at 50: How the 1969 riots transformed LGBTQ Austin

Epp is complemented in this portrayal by Wyatt Fenner’s Nijinsky, a more unintentionally comedic figure whose darkness is immediately on the surface. What hides those somber shades, though, is not a protective layer of wit, but rather the vanity and beauty of a lithe, catlike dancer who prowls the stage, at times more panther than man.

Indeed, one gets the feeling that not a single motion in “Immortal Longings” is wasted or unintentional, in keeping with the specificity of the classic ballets created by the two men. The team of director Peter Rothstein and choreographer Kelli Foster Warder have created a portrait of elegance counter-posed with bursts of sudden ugliness, which physically embodies the questioning of art and beauty that is so crucial to the text. They are aided in this by the mutable, deceptively simple scenic design by Michael Hoover, evocative lighting design by Philip Rosenberg and especially the sumptuous period costumes designed by Susan Branch Towne.

Though it is beautiful in multiple senses, “Immortal Longings” does have a few weak spots. In following the real-life biography of Diaghilev, the text drops some of the more interesting themes, such as exploration of the abusive relationship between the producer and his muse and the ways in which their collaborations with the best composers of the day helped to usher in modernist art. What’s more, though McNally sometimes blurs the lines between reality, memory and fantasy, the transitions between these moments are somewhat unclear, lessening their impact.

Even when the story gets somewhat muddled, though, the sheer artistry and grace of “Immortal Longings” shines forth. It is a picture-perfect study of the converging lines of beauty and agony, and a defense of how the former can save us from the latter in troubling times like those we face today.

>> RELATED: Joel Kim Booster wants you to talk about sex

Correction: An earlier version of this post said that Terrence McNally was a Pulitzer Prize winner. He is a Pulitzer Prize finalist and a Tony Award winner.