Paul McCartney got a surprise visit from a fellow rock legend during his stop in Boston on July 17.

Grateful Dead co-founder Bob Weir, enjoying some free time between dates on the current Dead and Company tour, stopped by during McCartney's set at Fenway Park to chip in on the evening's performances of "Helter Skelter" and "Hi Hi Hi." As you can see in the few moments of pro-shot footage embedded above, the duo were also joined by New England Patriots player Rob Gronkowski, who strolled out on stage to dance and play air guitar.

As Consequence of Sound notes, Weir's guest appearance at the McCartney show marked the first time a former Beatle had shared the stage with a Dead vet, although the two acts have had some personal and professional overlap. Dead frontman Jerry Garcia covered John Lennon's "Imagine" — for which Lennon later reportedly personally thanked him — and in 1996, McCartney served as the de facto director of a sort of Dead tribute film.

The short, titled Grateful Dead: A Photofilm, emerged after McCartney unearthed four rolls of Dead photos taken by his wife Linda in the late '60s. "If Andy Warhol can film the Empire State Building for three hours," McCartney quipped to the New York Times, "I figure I can do something with four rolls of film."

McCartney's One on One Tour is currently scheduled to run through early October, after which he's set to perform at the Desert Trip festival. Dead and Company, meanwhile, will play a handful of West Coast dates in late July, concluding with a July 30 performance in Mountain View, Calif.

Paul McCartney Albums Ranked Worst to Best