The Duke of Sussex joined Jon Bon Jovi on a rainy London zebra crossing to recreate the Beatles’ Abbey Road album cover at the recording of a charity single.

In one of his final engagements before stepping back as a working royal, Harry attended a re-recording of Bon Jovi’s song Unbroken, performed with the Invictus Games Choir to raise money for the international multi-sport event for injured or sick military personnel.

At Abbey Road Studios, where the Beatles recorded in the 1960s, Harry joined the singer at the microphone in a video shared on the Sussexes’ Instagram account. “We’ve been gargling next door, so we’re ready to go,” Harry joked to a sound engineer.

The idea for the collaboration had come from Bon Jovi, who said he had sent the song to Harry and received a “very nice letter” in return.

Bon Jovi paid tribute to Harry for finding the time to tour the studios despite the state of flux over the Sussexes’ transition to financial independence. He said: “I don’t know what it’s like to walk in his shoes, and as an American I am further removed, but I have immense respect for the family, for his brother, himself, his wife, father, grandmother – we have immense respect for them in America.”

The two later joined two members of the choir in recreating the famous photograph of John, Paul, George and Ringo.

Unbroken was originally written by Bon Jovi to highlight the plight of veterans living with post-traumatic stress disorder. The new single is in aid of the Invictus Games Foundation, which oversees the Invictus Games and which Harry founded.

To promote the event, crowds outside Buckingham Palace were treated to a medley of Bon Jovi songs during the changing of the guard.

The Duke and Duchess of Sussex will cease being working royals on 31 March.