Updated

Sochi, Russia (SportsNetwork.com) - Latvia has just one win at the Sochi Games. But somehow it is still alive to win a medal in the men's hockey tournament.

After going winless in Group C play, Latvia advanced to the quarterfinals on Tuesday and exacted a measure of revenge against Switzerland, as Lauris Darzins scored twice to help eliminate the Swiss with a 3-1 upset win.

Edgars Masalskis stopped 32-of-33 shots for Latvia, which will now play heavily-favored Canada in Wednesday's quarterfinals.

Swiss goaltender Jonas Hiller, who came into this game having not allowed a goal with two shutouts, including one over Latvia, surrendered two first- period goals and ended the game with 19 saves.

Latvia scored 8:38 into the opening period when Oskars Bartulis sent what seemed to be an innocent shot on net from the right circle. Hiller, though, was badly screened in front and the puck sailed over his glove.

Darzins then gave the Latvians a two-goal edge less than three minutes later with a power-play goal that found its way over the right shoulder of Hiller.

It was the fourth power-play tally of the tournament for Latvia.

The Swiss got on the board with just under five minutes remaining in the second when Martin Pluss took a feed from Reto Suri between the circles and sent a shot past the outstretched left leg of Masalskis

Darzins, though, ended any chance of a comeback with an empty-netter with a minute left to play.