VANCOUVER — The coaches and players of the Canadian men's hockey team thought they played their finest game yet at the Vancouver Olympics, but their best wasn't good enough on Sunday.

The United States upstaged its North American rival with an important 5-3 victory in a hostile environment at Canada Hockey Place on the final day of the preliminary round. The pro-Canadian capacity crowd of 18,561 witnessed a dandy game, but U.S. goalie Ryan Miller was the best performer on the ice. The brilliant Buffalo Sabres netminder made 42 saves to keep his team a perfect 3-for-3.

The United States received a bye into the quarter-finals on Wednesday, while Canada was relegated to qualification Tuesday. The Canadians will meet Germany, and a win would advance them to a quarter-final match against Alexander Ovechkin and Russia on Wednesday.

Canada now has to win four Game 7's in six days to win the gold.

"It's the situation we find ourselves in," Canada captain Scott Niedermayer said. "We'll try and make the best of it."

Canada finds itself in this difficult situation because of a poor start against the U.S.

"We were standing around and watching the puck too much," said Canadian defenceman Duncan Keith, whose team outshot the U.S. 45-23.

The defence also had difficulty in its own end and couldn't handle the speed of the U.S. forwards. "In our defensive zone we had a few lapses," Canada's Chris Pronger said.

Goaltending a concern

Finally, Canadian goalie Martin Brodeur did not distinguish himself.

"It's obviously an area we would have liked to be better," Canadian coach Mike Babcock said.

Before the tournament began, goaltending was a question mark for Canada because neither Brodeur nor Roberto Luongo had played his best in the days leading up to the Olympics.

Babcock would not commit to whether Brodeur or Luongo would play against Germany. Canada's head coach wanted to allow the emotion from the game to subside and review the game tape before he decides on his starter for Tuesday's game.

The first goal surrendered by Brodeur deflected off Sidney Crosby's stick and the second marker was a screen shot.

Other than the solid start and a timely goal from defenceman Brian Rafalski, his second goal of the game that arrived 23 seconds after Eric Staal tied the affair midway through the first period, the Canadians didn't give much credit to the U.S.

Besides Miller's strong play, the U.S. collapsed around their goaltender time-and-time again to limit second chances. They also blocked plenty of Canadian shots.

An added bonus was the strong play of the U.S. shutdown defence pair of Brooks Orpik and Jack Johnson. They saw plenty of ice time against Crosby's line, which was on the ice for the first three U.S. goals.

'We did a lot of really good things'

But U.S. coach Ron Wilson conceded that the Canadians had twice as many quality scoring chances. Babcock agreed.

"I thought we did a lot of really good things," he said. "We had the puck a lot."

Canada did have its moments, dominating for a long stretch in the second period. But the U.S. still escaped with a 3-2 lead after 40 minutes. After Canada's Dany Heatley tied the game early in the second period, Chris Drury put the U.S. back in front by a goal when Brodeur was caught out of position after he chased a loose puck.

Rafalski was the offensive hero for the U.S. against his Detroit Red Wings coach. He fired a shot that Jamie Langenbrunner redirected for a power-play goal to put the U.S. ahead 4-2 in the third period. Crosby scored a power-play goal later in the final frame to bring Canada closer. But after the Canadians turned up the heat for a couple of shifts, Vancouver Canucks centre Ryan Kesler scored an empty-netter in the final minute.

"We were standing around a little bit at the start and maybe a little jumpy," Canada's Jarome Iginla said. "But after that, we started to settle in a bit and we started to look like a lot quicker team."

Maybe the U.S. simply felt less pressure. The players certainly had fun at their team dinner in a downtown restaurant on Saturday.

The coaching staff surprised the players with the "This is your time" speech from little Herbie. Five-year-old Nashville-area kid Josh Sacco has become a YouTube sensation with his Herb Brooks imitation from the movie Miracle, and he was invited to entertain the U.S. team. The players cracked up over his performance.