By Frank Pingue

TORONTO (Reuters) - Canada clinched the top spot in Group A by beating Team Europe, while North America stayed in the hunt for a semi-finals berth with a thrilling 4-3 overtime win over Sweden on Wednesday at the World Cup of Hockey.

Canada improved to a perfect 3-0 with a dominant 4-1 win boosted by two goals and an assist by Jonathan Toews and will meet either Russia or North America in Saturday's semi-finals.

Team Europe will play Sweden in the other semi-final.

"Big win for our team," Canada coach Mike Babcock told reporters. "We're set up good."

Sidney Crosby opened the scoring for Canada four minutes into the first period on a wrapround goal past goalie Jaroslav Halak, whose 42 saves including several sensational stops.

Toews, however, capitalized on a Halak turnover to double the lead late in the first period, when Matt Duchene intercepted the goalie's attempt to clear the puck from behind the net and threw it in front to Toews for an easy goal.

Marian Hossa made it 2-1 less than five minutes into the second period, beating Canada goalie Corey Crawford from a tight angle on the left side but Toews restored the two-goal lead with five minutes to go in the period wristing one in on a 2-1 break.

Logan Couture added the final goal with 2:27 left.

While Canada controlled the Group A showdown, the earlier contest climaxed in a wide open, three-on-three overtime.

Sweden, who got the point they needed to secure a berth in the semis, began the tournament as favorites to reach the finals but a speedy Team North America wasted little time showing they were not intimidated.

Team North America, a mix of U.S. and Canadian players 23 and younger, scored two goals in the opening 95 seconds but Sweden twice erased two-goal deficits to force overtime.

Canadian Nathan MacKinnon scored the winning goal with 49 seconds to play in overtime when he was alone deep in the Swedish zone and used a series of dekes to avoid a pokecheck from Henrik Lundqvist before backhanding the puck into the net.

"Johnny (Gaudreau) made a great pass to me and I just thought I'd put it away because I wouldn't have been able to backcheck, I would've been too tired," said MacKinnon.

"I was just kind of juggling the puck and I saw him trying to pokecheck me so I knew I had to toe drag him. I was just thankful it got up."

MacKinnon's goal came moments after Sweden's Daniel Sedin had a chance to end the game but was denied on a breakaway.

Despite the win by Team North America (2-1), Russia (1-1) hold the tiebreaker over the youngsters and will earn the other semi-final berth if they beat Finland (0-2) on Thursday to close out Group B play.

Team North America, a talent-laden squad dismissed by many as gimmicky when the tournament format was announced, got off to a dream start when American Auston Matthews cashed in a rebound 30 seconds into the game.

They doubled their lead when American Vincent Trocheck put a rebound into the back of the net.

The stunned Swedes slowed down Team North America just before the midway mark of the first period when Filip Forsberg sent a puck under the right arm of American goalie John Gibson.

But Team North America restored their two-goal lead five minutes later when Gaudreau used a nifty deke to beat Lundqvist.

Nicklas Backstrom pulled Sweden back to within a goal later in the period and Sweden finally tied it when Patrik Berglund tipped a Forsberg shot into the net about seven minutes into the third period to set up a wild finish.

(additional reporting by Larry Fine in New York; Editing by Steve Keating)