Updated

By Steve Keating

VANCOUVER (Reuters) - Canada set the stage for an explosive end to the Olympics by surviving a nail-biting 3-2 win over the Slovakian giantkillers on Friday, earning a date with the United States in the men's ice hockey gold medal game.

It will mark the second time in three Winter Games the North American rivals have clashed for the gold medal that hockey mad Canadians covet more than any other.

The victory also earned Canada a shot at revenge for a 5-3 preliminary round loss to the young Americans that forced the hosts to play a qualification game against Germany.

"In the end we feel fortunate to do what we came here for, which is to play for the gold medal," Team Canada coach Mike Babcock told reporters.

"Absolutely thrilled for our young guys and our team and this opportunity especially at home in Canada and to get another shot at the U.S.

"I think it is real special.

"You may find this hard to believe but it doesn't matter to me who we're playing."

SURPRISE PACKAGE

Slovakia, the surprise package of the tournament with wins over top-ranked Russia and reigning champions Sweden, looked capable of extending their run and crushing Canada's dreams of gold when they got two late goals and nearly tied it in the dying seconds.

"We hope our team was part of very nice theater," said Slovakian coach Jan Filc. "We played with heart, desire, we wanted it. We were not lucky at the end."

The heart-stopping end to the semi-final game did not appear to be part of the script as Canada roared out to a 3-0 lead on goals from Patrick Marleau, Brenden Morrow and Ryan Getzlaf.

With Canada in control and less than 10 minutes to play the capacity crowd at Canada Hockey Place had been in full party mode and were already chanting "We want USA. We want USA."

But the celebratory mood suddenly turned tense when Lubomir Visnovsky and Michal Handzus scored goals less than four minutes apart, leaving Canada scrambling over the final five minutes as the never-say-die Slovakians looked for the equalizer.

With their goaltender out in favor of an extra attacker and less than a minute to play, Slovakia's Pavol Demitra had a shot from in close to tie the game but was stopped by Roberto Luongo.

When the final buzzer went off it brought relief to a crowd that had been on the edge of their seats and to millions of breathless television viewers.

The crowd erupted with a half-hearted celebration, drained by the climax.

"You have to give them a lot of credit they didn't quit. It was great to see that buzzer go off," said Canadian forward Jarome Iginla told reporters. "It got pretty intense there the last 30 seconds."

(Editing by Jon Bramley/Frank Pingue)