Baltimore's Dennis Pitta scored with 2 minutes, 5 seconds left, then Toby Gerhart answered with a 41-yard touchdown 38 seconds later. Jacoby Jones took the ensuing kickoff 77 yards for a touchdown, then Cordarrelle Patterson raced 79 yards down a snow-swept field for what looked like the winning score with 45 seconds left.

But with this being the 2013 Vikings, that wouldn't be the end of the story.

A game played in a snow globe ended in a flurry of points, as the Ravens and Vikings combined for five touchdowns in the last 2:05 to take what had been an uneventful game to its madcap conclusion. The final twist came when Joe Flacco drove the Ravens 80 yards in the final 45 seconds — with the help of a Chad Greenway pass interference penalty that negated an Andrew Sendejo interception — and hit Marlon Brown for the game-winning score with four seconds left in a 29-26 Ravens victory.

That game on Dec. 8, 2013, the most recent contest between the Vikings and Ravens, was the fifth that season in which the Vikings blew a lead in the final minute. It dropped the Vikings to 3-9-1, and no matter how turbulent the team's quarterback situation had been that season, the defensive collapses effectively sealed Leslie Frazier's fate as the Vikings' head coach.

The Vikings hired Mike Zimmer on Jan. 15, 2014, in large part to fix a defense that had been the league's worst the previous season, but had the 2013 Vikings simply been able to hold on to their late leads, they would have won the NFC North in a season where Aaron Rodgers missed seven games because of a broken left collarbone. It was the two-minute defense that needed the most immediate improvement, and after a bumpy start, Zimmer's teams largely have cleaned it up.

The Vikings have blown only two leads in the final two minutes of games since 2015, and haven't allowed a touchdown in the final two minutes since 2014. The Vikings also haven't allowed a go-ahead touchdown in the game's final minute since then, and the only two games where they've blown leads in the last two minutes came last year, when the Lions' Matt Prater kicked a 58-yard game-tying field goal as time expired Nov. 6, and came back with game-tying and game-winning field goals in the last 1:45 on Thanksgiving Day.

Otherwise, the Vikings have been able to salt away late leads, going 6-2 since 2015 when up by a touchdown or less in the final two minutes.

"The most important thing is knowing the situation — what do they have to get, how many timeouts, is the clock in your favor?" Zimmer said. "When the game's on the line, it's a little bit different. It's a little bit quicker."

The two Lions losses, as well as two other close games where the Vikings already were trailing by the game's final minutes, were enough to make situational awareness a focus of their training camp. Zimmer made a regular habit of having players work through game situations at the end of practice, calling out the down and distance and taking timeouts during the session in an attempt to familiarize players with what they should be looking for at the ends of games. Two weeks ago in Chicago, with the Bears looking for a potential go-ahead score in the final minutes, Harrison Smith picked off Mitch Trubisky to set up Kai Forbath's game-winning field goal.

"I think it's just having an understanding of what the offense is trying to do, mostly," he said. "Obviously, when you're going against certain quarterbacks, they're better than other ones. So you have to be conscious of when you pressure, when you don't pressure, when you play something a little softer."

Flacco has 19 career fourth-quarter comebacks to his name, including one against Zimmer's Bengals defense in 2013. The Ravens' special teams — such a pivotal piece of the 2013 comeback — remain perhaps the best in the league.

"I went back and watched it on Monday; that got me ticked off for the rest of the week. And no, I haven't really slept. So, I'm a little ornery right now," special teams coordinator Mike Priefer said. "We'll get after them, we're looking forward to it. We should've helped our team win that game, and we should've won that game and special teams didn't do enough to help."

But the Vikings' bizarre defeat in Baltimore in 2013 probably wouldn't have happened if their defense had been better late. Four years later, the Vikings still have quarterback intrigue, and they're again in a position to pounce in the NFC North with Rodgers out because of a broken collarbone. If they weren't capable of sealing up wins back then, they seem to be now.

"Any time you lose a game, even though it's four years ago, you kind of look back and say, 'You know, what if?' " Priefer said. "We've got to be better prepared this time around."

Ben Goessling is a Vikings beat reporter.

Twitter: @GoesslingStrib Email: ben.goessling@startribune.com