An Olympics that began with the death of a luger ended Sunday with an exuberant celebration of Canada - reflecting a determined comeback by the host country's organizers and athletes.
A festive crowd of 60,000 jammed into BC Place Stadium for the closing ceremony, many of them Canadians abuzz over the overtime victory by their men's hockey team earlier in the day to give the host nation a Winter Olympics record of 14 gold medals.
The gaiety - capped by a boisterous rock concert - contrasted sharply with the moment of silence at the opening ceremony Feb. 12 for Nodar Kumaritashvili, the 21-year-old lugeron the sliding track in Whistler just hours before that ceremony.
The speakers of honor on Sunday, chief Vancouver organizer John Furlong and International Olympic Committee president Jacques Rogge, each paid tribute to the young athlete.
"We are so sorry for your loss," Furlong said, addressing himself to the nation of Georgia. "May the legacy of your favorite son never be forgotten and serve to inspire youth everywhere to be champions in life."
Furlong then shifted to a more upbeat tone.
"I believe Canadians tonight are stronger, more united, more in love with our country and more connected to each other than ever before," he said.
He paid tribute to moguls skier Alexandre Bilodeau, winner of Canada's first gold medal at these games, and said of the final gold, won by the hockey team, "Our last one will be remembered for generations."
Rogge then pronounced the games closed, after describing them as "excellent and very friendly."
Neil Young, the durable Canadian folk-rock star, performed a lyrical version of his "Long May You Run" - and the Olympic flame faded away as he ended.
Canadian officials ensured an extra measure of poignancy at the ceremony by selecting figure skater Joannie Rochette as their flagbearer. Her mother died of a heart attack hours after arriving in Vancouver last weekend, but Rochette chose to carry on and won a bronze medal, inspiring her teammates and fans around the world.
"Yes, it's been a tough week for me," she said before the ceremony. "But I walk tonight into that stadium with a big smile on my face. ... I accomplished my goals, and I want to celebrate with my teammates."
Her entire team was greeted with a mighty roar when they joined the fast-moving, informal parade of athletes into the stadium. Among the cheerleaders was Prime Minster Stephen Harper, wearing a Canada jacket.
The U.S. flagbearer was Bill Demong, a veteran of four Olympics who won a gold and silver medal in Nordic combined.
There were plenty of reasons for Canada and the United States to celebrate after 17 days of competition. The U.S. won 37 medals overall - the most ever for any nation in a Winter Olympics.
Canada, after a slow start, set a Winter Games record with 14 golds and sparked public enthusiasm in Vancouver that veterans of multiple Olympics described as unsurpassed.
The comeback by the Canadian athletes was mirrored by the resilience of the Vancouver Organizing Committee. It struggled with a series of glitches and weather problems early in the games, adjusted as best it could, and reached the finish line winning widespread praise for an exceptional Olympics - albeit one tinged with sadness.
Right from the start of the closing show, there was a spirit of redemption as the producers made up for an opening-ceremony glitch in which one leg of the Olympic cauldron failed to rise from the stadium floor. On Sunday, the recalcitrant leg rose smoothly and former speedskating medalist Catriona LeMay Doan - who missed out on the opening-night flame lighting because of the glitch - got to perform that duty this time.
Later came the traditional handover ceremony, during which the Olympic flag was lowered and presented to the hosts of the next Winter Games in 2014.
Vancouver Mayor Gregor Robertson handed over the five-ringed flag to IOC president Jacques Rogge, who passed it on to Anatoly Pakhomov, the mayor of Sochi, Russia. That was followed by the Russian national anthem and a presentation about Sochi featuring opera, ballet, ice skating and giant glowing spheres called "zorbs."
Other key moments in the closing:
-The awarding of medals for the men's 50-kilometer cross-country ski race, won by Petter Northug of Norway.
-The swearing-in of two new members of the International Olympic Committee chosen by their fellow athletes - U.S. hockey player Angela Ruggiero and British skeleton racer Adam Pengilly.
-The singing of the Olympic anthem by renowned Canadian tenor Ben Heppner.
-A tongue-in-cheek revue of Canadian icons and symbols, featuring singing-and-dancing Mounties, tabletop hockey players, dancing canoes and flying moose and beavers.
-A segment in which Canadian actors - including William Shatner and Michael J. Fox - made fun of national stereotypes.
Fox, who has Parkinson's disease, received a huge ovation.
"I lived in the U.S. for 30 years," Fox said. "But if the U.S. is playing Canada in hockey, I'm sorry, I'm wearing a maple leaf on my sweater."