Prince Harry grew emotional as he thanked a "haunted" bagpipe player for his performance.

Prince Harry gave an emotional speech

Prince Harry gave an emotional speech

The 39-year-old royal paid tribute to Master Corporal James Gendron, who he had met in the Canadian tent at the Invictus Games, as he told how much he loves the sound of the instrument, so was pleased when the veteran played for him - only realising afterwards how difficult it was for the soldier because of the memories it brought back.

In a speech to close the Games, Harry said: "Yesterday I met with Master Corporal James Gendron.

“While we were chatting, I noticed bagpipes lying on the floor in the far corner. Some of you may know what bagpipes mean to me, so I couldn’t help but hope they’d be played! Little did I know that thirty minutes later, it would be James picking them up and offering to play - yet I had no idea what they meant to him.

“Nor did I know what memories they triggered for him.

“In Afghanistan he played 63 ramp ceremonies. For 63 caskets. For 63 souls. For 63 families. For four years after that last ceremony, he couldn’t touch them. This week he wasn’t sure whether he could bring himself to play them. But he did.

“What had once haunted him, dare I say it, may now be what helps heal him. Thank you James, for your service, for your courage, for sharing your gift.”

In his speech, the prince - who was joined at the event by his wife Meghan, Duchess of Sussex - praised the competitors for inspiring people around the world.

He told the audience in Dusseldorf, Germany: “We’ve all witnessed the true impact sport has had on your recovery. But you will never truly know the impact your actions this week have had on millions of people around the world.

“You have opened people’s hearts, through your vulnerability, through your resilience and your sheer abilities. You have shown us that joy can emerge from struggle.”

The closing ceremony also featured performances from Rita Ora and Sam Ryder.

Harry has previously spoken of how the bagpipes remind him of the death of his mother, Princess Diana.

He wrote in his memoir 'Spare': "With bagpipes it's not the tune, it's the tone. Thousands of years old, bagpipes are built to amplify what's already in the heart. If you're feeling silly, bagpipes make you sillier.

"If you're angry, bagpipes bring your blood to a higher boil. And if you're in grief, even if you’re twelve years old and don't know you're in grief, maybe especially if you don't know, bagpipes can drive you mad."