TORONTO -- The Invictus Games closed Saturday night with a celebration of spirit, an emphatic dose of classic rock, and an official handover to the 2018 hosts from Sydney.

The weeklong event, aimed at helping the war wounded with their recovery, was capped with a two-hour closing ceremony at Air Canada Centre.

Prime Minister Justin Trudeau's wife, Sophie Gregoire Trudeau, handed out participation medals to competitors on their way to the arena floor and had a message for the athletes once the ceremony began.

"These Invictus Games are a celebration of your fearlessness," she said.

Gregoire Trudeau sat beside Prince Harry, who earlier presented a medallion to each team captain after the 17-country parade of nations. Harry's girlfriend, Meghan Markle, watched the proceedings from a private box.

Former U.S. Vice-President Joe Biden, Ontario Premier Kathleen Wynne, and Seamus O'Regan, the Minister of Veterans Affairs, were also on hand.

Unlike the theatrical ceremonies at other multi-sport games, the focus here was on the competitors and their performances.

Highlight packages from the week were shown on video screens and musical performances by Bruce Springsteen, Bryan Adams, Coeur de pirate, Kelly Clarkson and Bachman & Turner were intertwined between speeches.

The first Invictus Games were held in London in 2014 and Orlando served as host last year. This year's event featured competitors from 17 countries participating in 12 different sports.

Prince Harry made appearances around town throughout the week and generated plenty of buzz when he and Markle, a Toronto-based actor in the legal drama "Suits," made their public debut as a couple at a wheelchair tennis event.

Team United Kingdom's Mark Ormrod was the winner of the Jaguar Award for exceptional performance, determination and dedication. Team Afghanistan won the Land Rover Above and Beyond Award for sportsmanship, commitment and spirit.

Springsteen generated a tremendous pop midway through the ceremony. Armed with just an acoustic guitar, capo, and harmonica, he wowed the near-sellout crowd with a soaring three-song set that included "Working on the Highway," "The Promised Land," and "Dancing in the Dark."

Wynne followed by thanking volunteers and introducing the flag handover segment as Invictus Games Foundation chair Sir Keith Mills passed the flag to the Australian delegation.

Next up was Adams, who performed "Summer of '69" before bringing Springsteen back out for chugging versions of "Cuts Like a Knife" and "Badlands."

Prince Harry returned to the stage to greet the performers before providing a rousing closing speech.

"This is the moment. Right here, right now, shoulder to shoulder, you are Invictus," Harry said to the competitors.

Bachman & Turner closed the ceremony with a medley dubbed the "Canadian Send-Off." It included classic rock anthems "Taking Care of Business," "You Ain't Seen Nothing Yet," "Let It Ride," and "Rolling Down the Highway."

Prince Harry visited the U.S.-based Warrior Games for wounded, ill and injured military personnel and veterans in 2013. It inspired him to create an expanded international version, and he attracted over 400 competitors from 13 nations for the inaugural Invictus Games.

This year's Games featured 550 competitors.