The US rockers were introduced to the stage by the flame-haired royal and he gave frontman Dave Grohl a warming embracing before the singer kicked off the final performance of the closing ceremony in sublime style with their 2002 hit single 'All My Life'.
In his final address at the Games, which he helped organise, Harry apologised to the crowd for keeping them from hearing the rock band and poked fun at the 45-year-old singer.
He said: ''I can hear Dave Grohl screaming at me from behind,'' and later joked: ''Why do you want to hear him anyway? He's old!''
The crowd at the Queen Elizabeth Olympic Park in Stratford, east London, had been fairly subdued throughout the closing ceremony but there was no sign of that when the Foos took to the stage for an 11-song set as everyone was on their feet.
The group put in a barnstorming display of several greatest hits including 'Times Like These', 'Learn to Fly' and 'Best of You'.
Dave admitted the group had chosen the spectacle as one of their first big performances in the UK for a few years because it was a special occasion and told how Harry had given him a call to invite the group to headline the spectacle.
He said: ''It's been a while since we played in this country. So I got a call from a friend who rang me up and he said, 'Can I give Prince Harry your number'? So I said OK - everyone else has it.''
Dave dedicated the Foos' hit 'My Hero' to all the soldiers who competed at the inaugural sporting event, saying: ''This next song goes out to all the heroes tonight.''
The group signed off for the night in fantastic fashion with 'Everlong', and Dave admitted it wouldn't be ''too long'' before the rock band are back on English soil again.
He told the crowd: ''Thank you very much for making this one of the most special occasions of our lives. I can't wait to come back and play for you again. It won't be too long.''
Jaguar Land Rover are the official presenting partner of The Invictus Games. Visit www.jaguarlandrover.com.
Have a spookily musical Halloween this year.
Courtney Love went from Faith No More to Pagan Babies before roles in Sid And Nancy and Straight To Hell propelled her forward to form her seminal...
Returning with their first new song in five years, Placebo have just dropped ‘Beautiful James’ as the first taster of their forthcoming album.
Tour and festival announcements for September 17th 2021.
The Cheshire four-piece unveil a new politically-charged single entitled Show & Tell.
Billie, Lil Nas X and Rihanna stole the show at the fashion event.
Having just celebrated the release of his debut EP, 'The Life and Death of MacKenzie Kane', Portuguese singer-songwriter Zé Pedro Viveiros, aka Zed...