Canada survived one of the greatest games in Olympic history to beat the Americans 3-2 in overtime and cap the host country's record gold rush in Vancouver.

Crosby  hockey heir to Canada's own Great One, Wayne Gretzky  won it when he whipped a shot past U.S. goalie Ryan Miller 7:40 into overtime after the U.S. had tied it with 24.4 seconds left in regulation.

Canada's collection of all-stars held off a young, desperate U.S. team that had beaten it a week ago and, after staging a furious comeback from down 2-0 on goals by Jonathan Toews and Corey Perry, almost beat the Canadians again.

With Canada less than a minute away from celebrating the gold medal, Zach Parise  the son of a player who figured in Canada's finest hockey moment  tied it with Miller off the ice for an extra attacker.

The moment he scored, the groans of disappointed fans likely were heard from Vancouver to the Maritimes. But Crosby, scoreless the previous two games, brought back the cheers with his second post-regulation game-winner of the tournament, a shot from the left circle that Miller was helpless to stop. He also beat Switzerland in a shootout during the round robin.

It was close. It was nerve-racking. It was a game worthy of an Olympic hockey final.

Before the game, Crosby received a brief text message from Penguins owner Mario Lemieux that said: "Good luck."

Now, Crosby joins Lemieux  whose goal beat the Soviet Union in the 1987 World Cup  and Paul Henderson, who beat the Soviets with a goal in the 1972 Summit Series, among the instant national heroes of Canadian hockey. At age 22, Crosby has won the Stanley Cup and the Olympics in less than a year's time.

Minutes after the game ended, delirious fans chanted, "Crosby! Crosby! Crosby!" International Olympic Committee president Jacques Rogge paused before giving the final medal to Crosby as the crowd got even louder. Then he gestured with his right hand, calling for more cheers for Crosby.

As "O Canada" played, the Canadian team stood shoulder to shoulder, arms over each others' shoulders. The U.S. team stood dejected, staring at the ice, many with their hands on their hips.

"Our team worked so unbelievably hard," Crosby said. "Today was really tough, especially when they got a goal late in regulation. But we came back and got it in overtime."

To win, Canada withstood a remarkable and determined effort from a U.S. team that wasn't supposed to medal in Vancouver, much less roll through the tournament unbeaten before losing in the first overtime gold-medal game since NHL players joined the Olympics in 1998.

"No one knew our names. People know our names now," said Chris Drury, one of three holdovers from the 2002 U.S. team that also lost to Canada in the gold-medal game.

Miller, the tournament MVP, was exceptional, and Parise scored a goal that  if the U.S. had won  would rank among the storied moments in American Olympic history.

With less than a half minute remaining and Miller out of the net and off the ice for an extra attacker, Patrick Kane took a shot from the high slot that deflected off Jamie Langenbrunner to Parise, who shot it off Canadian goalie Roberto Luongo's blocker and into the net.

Parise is the son of J.P. Parise, who scored two goals for that 1972 Canada Summit Series team.

Three minutes before Parise scored, Kane  who also set up Ryan Kesler's goal in the second period  knocked the puck off Crosby's stick on a breakaway that would have sealed it for Canada.

Luongo didn't outplay Miller, but still proved he is a big-game goalie  something he has never been previously  by making 34 saves in his own NHL arena. Luongo went 5-0 in the tournament and 4-0 after replacing Martin Brodeur following America's 5-3 win the previous Sunday.

OK, you can exhale now, Canada. The quivers of fear created by the loss to the U.S. and the shootout over Switzerland are gone, replaced by the good-as-gold feeling that was a necessity for Canada to truly proclaim these Olympics a success.

Canada won its eighth hockey gold medal and only its second since 1952  it beat the U.S. 5-3 in Salt Lake City in 2002. For the United States, considered on a tier slightly below the Canadians, Russians and Swedes when the games began, it was an immense letdown, especially since it was the best team from nearly start to finish. Nearly.

"It stings right now," said Miller, who made 33 saves after giving up only a goal per game in the first five games.

"It's devastating. It was the biggest game any of us have played in," U.S. defenseman Jack Johnson said.

Requiring the United States to beat favored Canada two times in eight days was a monumental task; under Olympic formats used until the 1990s, when there wasn't a true gold-medal game, the earlier victory and the Americans' unbeaten record would have been enough for gold. The U.S. has never won an Olympics outside the U.S., with its two golds coming in 1960 at Squaw Valley, Calif., and 1980 at Lake Placid, N.Y.

Unlike those games, it wouldn't have been a miracle if America had won  but, given the opponent and the circumstances, it would have been one of the nation's proudest moments in international sports.