The penultimate episode of David Lynch's Twin Peaks revival included a cameo appearance — and musical performance — by Pearl Jam frontman Eddie Vedder, who stopped by to play his new song "Out of Sand."

Vedder's visit took place at the Bang Bang Bar — also known as the Roadhouse — the Twin Peaks location that traditionally plays host to an episode-ending musical performance. Introduced by his birth name, Edward Louis Severson III, Vedder took the stage wearing a fedora and toting an acoustic guitar in the clip, which you can watch via the above embed.

"Out of Sand" was written specially for the show, although Twin Peaks didn't mark its first public airing — Vedder previously performed it at the Ohana Music Festival in Dana Point, Calif. last year. As Twin Peaks musical director Dean Hurley recently told KEXP, Vedder's involvement — which came about through his friendship with Peaks star Laura Dern — was just as surreal as fans of the show might expect.

"I had a conversation with him on the phone, and he was a super sweet guy, super modest, but so warm and generous. He was asking me about the show, and I didn't know what to say — I mentioned a few maybe abstract themes from the show to him, but after mentioning those few items, he was just like, 'Okay, well, sounds like we're throwing darts at the wall,'" said Hurley. "I thought that was a really good phrase — he's just going to try something and send it over, and it's like throwing a dart blindfolded. But he's an amazing dart player, because the first dart he threw, David listened to it and said, 'It's great, it's going in the Roadhouse. I love the song.' It oddly does unknowingly kind of touch on the feeling and vibe of the show, in terms of the lyrics and overall abstract theme of it all."

The Twin Peaks revival, which has also included a cameo appearance by the late David Bowie, is scheduled to conclude next Sunday (Sept. 3). Listen to "Out of Sand" above, and check out a clip of Lynch interviewing Vedder below.

Pearl Jam Albums Ranked in Order of Awesomeness

More From WGBF-FM