In a couple of minutes, an offensive struggle played in wintry conditions morphed into a shootout, and it was the Ravens who made the final big play.

Joe Flacco’s 9-yard touchdown pass to Marlon Brown with four seconds remaining in the game gave the Ravens a wild 29-26 victory over the Minnesota Vikings in front of an announced 70,921, and capped a final 2:05 in which five touchdowns were scored, and the lead changed hands five times.

Brown barely got his feet inbounds to cap a five-play, 80-yard drive in 41 seconds that may have saved the Ravens’ season. With the victory -- their third straight -- the Ravens have a winning record for the first time since Week 5 and they maintain their hold on the sixth and final playoff spot.

The craziness started when Dennis Pitta, who was playing his first game of the season, caught a 1-yard touchdown pass on fourth-and-goal with just over two minutes to play. The catch, coupled with a two-point conversion to Torrey Smith, gave the Ravens a 15-12 lead.

Minnesota (3-9-1) needed just two plays to answer as Toby Gerhart, who played much of the game with star Adrian Peterson being knocked out in the second quarter because of an ankle injury, scored on a 41-yard run. At that point, the Ravens trailed, 19-15.

However, on the ensuing kickoff, Jacoby Jones took a short kick by the Vikings' Blair Walsh and sprinted up the sidelines, the 77-yard return giving the Ravens a 22-19 lead with 1:27 to play.

Again, the Ravens needed just one stop and they had the game won. But, they never got it. Matt Cassel hit rookie wide receiver Cordarrelle Patterson for a 77-yard touchdown with 45 seconds to play to give the Vikings the 26-22 lead.

When the Ravens took over at their own 20, they had two timeouts left and little more than 40 seconds to work. But Flacco hit Brown for a big completion to past midfield and then found Pitta to get inside the 10. He then hit Brown for the game-winning play.

The snow started coming down hard about 2 1/2 hours before kickoff. By 11 a.m., when players from both teams started coming out for pregame warm-ups, the field was almost completely covered and the yard markers weren’t visible.

The snow probably reached its peak right around kickoff, setting the stage for a sloppy afternoon during which footing was problematic.