GANGNEUNG, South Korea (Reuters) - Germany shocked top-seeded Sweden 4-3 after Patrick Reimer scored in overtime on Wednesday, beating the Scandinavians for the first time ever in Olympic play and booking a spot in the semi-finals of the men’s ice hockey tournament.

Slideshow ( 8 images )

Reimer’s goal a minute and a half into the extra period came after a frantic comeback by the Swedes, who scored three third-period goals to tie the game at 3-3 at the end of regulation.

“I just saw some space opening up towards the net, and I tried to take it there,” Reimer said of his goal. “It worked out, and somehow I got that extra bounce and worked it in.”

The win places Germany in the medal round, where they face Canada, and offers a German national team the chance to win their first Olympic medal since the Innsbruck games in 1976, when they claimed bronze.

Since German unification in 1990, Germany had not beaten Sweden at the Olympics, going 0-5 heading into the Pyeongchang Games. Sweden had added to that record last week, beating Germany 1-0 in the preliminary round.

Even before unification, the best result a German national team had earned against the Swedes in the Olympics was a 1-1 tie in 1984 at Sarajevo. East Germany were also winless, with a 0-1 record.

Germany took the lead on Wednesday in the first period with goals less than a minute apart.

Christian Erhoff scored on the powerplay with Sweden’s Dennis Everberg off for kneeing, and Marcel Noebels put the Germans two ahead 29 seconds later.

After a scoreless second period, Sweden cut Germany’s lead to 2-1 on a third-period goal by Anton Lander, assisted by defenseman Rasmus Dahlin, seen by many as the likely top pick in this year’s NHL draft.

But Dahlin, who has seen limited playing time so far in the Olympics, turned the puck over a couple of minutes later and the Germans pounced as Dominik Kahun took the score to 3-1.

However, the Swedes rallied and managed to level the game within four minutes.

First, with Germany’s Felix Schutz off for slashing, Patrik Hersley capitalized on the powerplay, and then Mikael Wikstrand netted the equalizer shortly afterwards.

Reimer was the match-winner, though, and said the Germans kept their cool despite losing the lead so late in the game.

“We knew Sweden always had the chance to come back,” Reimer said. “They tied up the game, but we didn’t want to lose our heads, and we managed to not do that.”