Joe Thornton scored with 4:22 remaining in the third period to give Canada a 5-4 win over Slovakia in its quarter-final at the 2005 world hockey championship.

Thornton's slapshot from the top of the faceoff circle fooled Slovak goaltender Jan Lasak for the game winner, while goaltender Martin Brodeur made a nice pad save on Zigmund Palffy in the final minute of play as Canada kept its hope of three straight gold medals at the worlds alive.

Thornton has been one of Canada's top players at the tournament, so it's no surprise he scored the deciding goal of the game. It was just an unlikely one.

Team Canada's players, from left, Wade Redden, Brendan Morrison, Dany Heatley and Ryan Smyth celebrate a goal in their 5-4 quarter-final win over Slovakia.  (AP Photo/Kevin Frayer)
Team Canada's players, from left, Wade Redden, Brendan Morrison, Dany Heatley and Ryan Smyth celebrate a goal in their 5-4 quarter-final win over Slovakia. (AP Photo/Kevin Frayer)

Lasak looked like he had the angle cut down, but Thornton's shot fluttered over the goaltender's head and into the right corner of the net.

"It was a knuckleball," a grinning Thornton said of his sixth goal in seven tournament games. "I've been watching Tim Wakefield a lot.

"I was as surprised as (Lasak) was when it went in. When the red light went on I thought, 'whew, that's a lucky one."'

Slovakia had an opportunity to tie it up when Canadian defenceman Robyn Regehr was given a penalty for interference, but couldn't score despite a few good chances.

Canada will play Russia, which defeated Finland 4-3 in a shootout on Thursday, in the semifinal.

In other action at the worlds, Czech Republic advanced to the next round with a 3-2 shootout win over United States.

The Czechs will play Sweden, which edged Switzerland 2-1, in the other semifinal.

Canada's quarter-final was a game that seemed to have everything: plenty of goals, scoring opportunities and a penalty shot.

Slovakia looked like it was on the verge of victory when Pavol Demitra scored a short-handed goal early in the third period to give his team a 4-3 lead, but Simon Gagne replied with his second goal of the game over four minutes later to tie it up.

Dany Heatley and Ryan Smyth also replied for Canada, while Marian Gaborik and Michal Handzus added singles and Demitra scored two for the Slovaks.

Rick Nash failed to score for the first time in the tournament, but the Columbus Blue Jackets star did add three assists in the come-from-behind win.

"It's very disappointing," said Handzus. "I think we had the team to beat them and go all the way.

"We played hard, but we made mistakes that cost us the game."

Lasak made 28 saves for Slovakia, while Brodeur stopped 21 shots for Canada.

It didn't take long for Slovakia to showcase its offensive strength in this one.

Just 45 seconds into the game, Gaborik took advantage of a lapse Canadian defence, receiving a nice stretch pass into the offensive zone to score a highlight goal.

After receiving the puck from Palffy, the Minnesota Wild star got tripped up by Ed Jovanovski, but quickly got back up and beat Brodeur with a back-handed shot over the glove side.

Gaborik's marker was the start of an entertaining first period, with both sides exchanging scoring opportunities.

Two Canadian markers on the power play and a nice Handzus breakaway goal made it 2-2 after the first period.

After having trouble containing Slovakia's offence in the first, the Canadians made a number of adjustments in the second and controlled the play.

It paid off when Gagne put in a Nash rebound to give Canada its first lead of the game at the 4:21 mark of the second.

Canada could have built on that goal, but undisciplined play gave the Slovaks a perfect opportunity to tie it up. With Brendan Morrison and Kris Draper in the penalty box, Slovakia passed the puck around until Demitra found himself with an open net and scored his first of the tournament.

Brodeur, however, made sure Slovakia didn't head into the third period with the lead.

Palffy received a penalty shot at 15:08 of the second when Regehr pulled him down on the breakaway.

Palffy looked like he had an easy goal with a nice deke to the left, but his shot hit Brodeur's outstretched glove.

Slovakia managed to take the lead, however, when Demitra's shot on a 2-on-1 rush beat Brodeur early in the third period.

That seemed to deflate the Canadians, but Gagne tied it up off a great pass from Nash, who fended off checkers behind the net before spotting the Philadelphia Flyer in the slot.

Gagne stuck out his right skate to stop the puck, kicked it to his stick blade and planted a wrist shot in a top corner of the net.

Overtime was looming when Thornton scored to give Canada the lead for good.