After hundreds of performances spanning five days and 75 venues, CMJ was finally coming to an end. But fans at The Delancey were in for one last surprise: an unscheduled set by indie pop rockers The Pains of Being Pure at Heart.

“We knew about the show in advance,” said Pains singer Kip Berman. “But we played earlier in the day at Brooklyn Bowl, so it was kind of like you play, and you’re tired, and then you have to pack your gear and go.”

The schedule for CMJ was released in early October, but it wasn’t until Saturday night that fans of British music magazine NME knew who was headlining their showcase at the Lower East Side venue.

The show at The Delancey also featured noise rocker Marnie Stern and Los Angeles band Kisses. The CMJ stops are the beginning of a short U.S. tour for the Pains, who will also be performing in Oregon and California.

The Pains of Being Pure at Heart garnered significant attention last year, releasing their first, self-titled full-length album and the “Higher Than the Stars” EP to virtually universal praise. The band plans to release a new album in March.

Berman said the experience of playing with his pals is still important to him.

“We’re all friends first, so it was just kind of a natural extension of our friendship to play music together,” he said. “It’s better to be good friends than good musicians.”