"This is just a little one I'm gonna borrow from Paul McCartney, for about 90 seconds," frontman Eddie Vedder told the crowd before diving in.
Ninety seconds was a bit generous — at just 23 seconds, the acoustic ditty from 1969 is the shortest song in the Beatles' catalog, though the quirky tune has become a fan favorite.
"Her Majesty" was originally part of the Abbey Road medley, meant to be sandwiched between "Mean Mr. Mustard" and "Polythene Pam," but McCartney, its writer, gave it the boot, according to the book The Beatles: A Hard Day's Write by Steve Turner.
Still, the engineer who cut it out didn't want it destroyed, so he stuck it on the end of the album — and when McCartney heard it there, he liked it, and decided to keep it. Though "Her Majesty" closes out Abbey Road, it wasn't listed on the album's original sleeve.
Max Mumby/Indigo/Getty Queen Elizabeth II at Royal Ascot
McCartney had the chance to play the song for the Queen herself in 2002, during a performance at her Golden Jubilee celebration in 2002.
"What the generation now can't understand is that guys my age, we were like, what, 14? Very formative teenage years, and the Queen was sort of, 24 or something," the star told 60 Minutes Australia in 2017 of Elizabeth. "So to us, she was a babe! There was a certain lustfulness in us teenagers for Her Majesty... So we grew up loving the Queen for various reasons. I mean now, I've been lucky enough to meet her. I just think she's a great woman."
Following the Queen's death at age 96, other musicians also made a point of paying tribute, including Harry Styles, who requested fans at his Madison Square Garden show give her "a round of applause for 70 years of service."
RELATED VIDEO: 'The Crown' to 'Stop Filming' After Queen Elizabeth's Death as Creator Calls Drama 'a Love Letter' to Monarch
Elton John also paid tribute while performing in Toronto, telling the crowd Elizabeth was "an inspiring person to be around."
"I've been around her and she was fantastic. She led the country though some of our greatest and darkest moments with grace, decency and a genuine care and warmth," John said. "I'm 75 — she's been with me all my life and I feel very sad that she won't be with me anymore."
The Queen died "peacefully" on Thursday at Balmoral after 70 years on the throne, making her the longest-reigning British monarch of all time.
Her son, King Charles III, immediately succeeded her, and he'll be formally proclaimed King by the Accession Council on Saturday morning.