Follow The Globe's SOCHI LIVE for the latest from the Winter Olympics.
For two-plus periods, Canada pressed and pushed and otherwise ran up an impressive shot total against a Latvia goaltender you've probably never heard of - Kristers Gudlevskis - and managed to get just the one goal past him.
It was 1-1 with time winding down in the third period and they were maybe starting to believe in miracles in Riga.
Alas for the plucky Latvians, it didn't happen.
Shea Weber's power-play goal with about seven minutes to go in the third gave Canada a heart-stopping, gut-checking 2-1 win and a berth in the semi-finals against the United States.
Canada is trying to win its first Olympic championship outside of North America in 62 years and the 11th seeded Latvians, who'd lost their first three games in the men's Olympic hockey tournament, seemed like an unlikely stumbling block. But they hung on with relentlessly determined defence, often having five forwards within arm's length of Gudlevskis and closing off shooting lanes left, right and centre.
Centre John Tavares was injured in a second-period collision along the boards and according to coach Mike Babcock, is out for the tournament. It means Matt Duchene, who was the odd man out against Latvia, will draw back into the line-up for the game against the U.S. The International Ice Hockey Federation permitted teams to name 25-player rosters just for this contingency, in case of an injury as the tournament moved along.
"He's got a leg injury, he's out for the tournament," reported Babcock. "He'll be re-examined by the New York Islander people and then I'm sure they'd have an announcement."
Babcock praised his team for overcoming the adversity that they faced against Latvia.
"To me that's a positive thing," said Babcock. "We plan on getting better each and every day.
"We play a U.S. team that seems to score real easy. We haven't scored real easy. But we'll be ready to play."
Time and time again, players dropped down in front of Shea Weber's lethal slapper to block a shot – and frequently, they had to limp off the ice because of the pain.
It was either going to be a narrow escape for the Canadians or the apocalypse was upon them. But finally it was Weber's goal, on a feed from Drew Doughty with Latvia's Georgjis Pujacs off for slashing, that proved to be the difference.
Weber and Drew Doughty, two defencemen, have accounted for seven of the 13 Canadian goals thus far in the tournament. With nothing open down low because there were often five players surrounding the Latvian goal, the only opportunities are coming from long range.
Thankfully for Canada, Weber can really shoot the puck. The Latvians were game, but Weber's shot is a weapon that's hard to defend.
"I don't think there's any difference," he said. "Guys definitely are warriors in the NHL as well. Guys block shots. Guys make a living doing that. They were playing with a lot of pride. They were doing what it took "Hopefully, nobody's hurt. Obviously, I hit a couple and they had trouble getting off. You don't want to see anybody get hurt."
Territorially, Canada held an edge in the play and if they'd scored early, the game likely could have gone in a different direction. Gudlevskis stopped Crosby on a first-period breakaway and seconds later, facing a wide-open net, his linemate Chris Kunitz rattled a shot off the post.
Things seemed headed in the right direction when Patrick Sharp opened the scoring for Canada 13:37 in, on a nice feed from Rick Nash, but Latvia scored just a little over two minutes later when Lauris Darzins slipped behind the Canadian defence and scored on a breakaway against Carey Price.
Darzins showed a neat move on the play, faking a shot and then going backhand up into the top corner.
Gudlevskis, a Tampa Bay Lightning prospect who will eventually be in the employ of Team Canada director of hockey operations Steve Yzerman, stopped 55 of 57 shots. Gudlevskis appeared to be injured at one point in the third, but he said afterward, he called for the trainer to give his team a rest. When asked if he was happy to keep the game close, the answer was no.
"You expect every game to win the game," said Gudlevskis. "If you go to the game thinking you're going to lose, it's going to be hard for you."
"We've played enough Olympic games or international hockey where it just seems to be like that, where the goaltenders make big saves," said defenceman Duncan Keith. "It happens. They just get hot. Give him credit, he made some big saves."
In the third period, the Canadians' top line of Jonathan Toews, Patrick Marleau and Jeff Carter thought they'd had a goal, but a Latvian defender put his hand on the puck as it was almost over the line and swept it back under Gudlevskis' equipment. By rule, that should have been a penalty shot.
"I didn't know that that guy put his hand on it till after I saw the replay," said Marleau. "I thought it was going to be close getting in the net, but they missed it."
Price had 16 saves, but it wasn't an easy game for him to play either, given how long he had to wait sometimes for scoring chances to come his way.
Crosby had his chances again, but wasn't able to score his first goal of the tournament.
"It was tough," he said. "We had some great chances and when you're getting chances like that there's not a lot you would change. It's not like you're going in there, adjusting and trying to figure something out. I think it's just the ultimate test of your patience when you're getting chances like that. You need to find a way to score."
Canada's next opponent, the U.S., seemingly has found a way to consistently score. Crosby was asked if Canada could continue to advance, getting so little form the forwards.
"I would say not but I think we're doing a lot of good things," he said. "Honestly, if we're talking about that, I don't know what we'd go back and change. You look at tonight, and besides picking the puck up and throwing it in the net, what could you tell someone to do in those situations? I think you just trust in what you do. I think as far as the depth that we have, we know that guys are going to put those in. It's nice to get that from the D, that's for sure."
Follow me on Twitter: @eduhatschek