It’s not hard to design a crowd-pleasing string quartet recital. You open with Haydn, toss in a little Mendelssohn or Brahms (maybe Debussy, if you’re daring), build up to one of the heftier Beethoven quartets and call it a day. It’s far more difficult to find fresh, pathbreaking new works that show how vibrant the quartet form still is — and that leave audiences on their feet and shouting for more.

But that’s exactly what the aptly named Carpe Diem String Quartet did on Sunday night, in an adventurous and often breathtaking recital of modern music at the National Gallery of Art’s West Garden Court. Eclectic almost to a fault, the group ranged from jazz to Turkish dances to some of the hardest-hitting music of the 20th century, and built to a spectacular climax with the premiere of a quartet by composer Jonathan Leshnoff that was nothing less than exalting — a major addition to the string quartet repertoire.

The program opened and closed with some likable arrangements of the jazz standards “Take Five” and “Blue Rondo a la Turk,” but far more exciting was a suite of five new dances by Erberk Eryilmaz. “Miniatures Set No. 4” is a swirling, dervish-like explosion of a work, full of Turkish folk rhythms and bluesy bent notes and sudden yelps and shouts from the players. The excitement continued with Bela Bartok’s equally volatile Fifth String Quartet from 1934, whose landscapes of slashing chords and windswept wildness were brought off with white-hot intensity.

The quartet’s violist, Korine Fujiwara, is a composer as well, and her 2010 work “Hands” proved an enjoyable and smile-filled work, awash in soaring melodies, snapping fingers and inventive ideas. But it was Leshnoff’s String Quartet No. 4 that was the real event of the evening. From a base of modest musical motives (inspired, in part, by a recorder recital at his daughter’s school), the quartet built with seamless logic into a vast, thoroughly beautiful and extraordinarily moving work, its juggernaut-like power balanced with a luminous, almost hymn-like sense of spirituality and grace. It is a masterpiece any way you look at it, and the Carpe Diem players — for whom the work was written — played it with the absolute commitment it deserved.

Brookes is a freelance writer.