MINNEAPOLIS (AP) -- In Favre they trust.
Brett Favre's 58-yard completion to Sidney Rice setup Ryan Longwell's fourth field goal, and Baltimore's Steve Hauschka missed a 44-yard field goal at the final whistle, allowing the Minnesota Vikings to remain undefeated with a 33-31 victory on Sunday.
Favre threw for 278 yards and three touchdowns, but the Vikings (6-0) nearly blew this one when they let the Ravens erase a 17-point deficit with 10 minutes to play.
Joe Flacco threw for 385 yards and two touchdowns for the Ravens (3-3), who scored twice on drives that totaled just 56 seconds to take a 31-30 lead with 3:37 to play.
But Hauschka pushed his field goal wide left, giving the Ravens their third straight loss.
This was billed as the first true test of the season for the Vikings, who came in having beaten five teams with a combined record of 7-17. One of those victories was a Favre comeback for the ages, when he threw a TD to Greg Lewis in the closing seconds to beat the 49ers.
He had another big throw in that 40-year-old right arm on Sunday against the Ravens, the big play to Rice.
The Vikings took a 14-0 lead in the first 9 minutes and led 27-10 when Visanthe Shiancoe caught his second TD of the game with 10:08 to play. But Flacco was just getting started.
He threw a 32-yard TD to Mark Clayton. After a field goal by Longwell, Flacco capped a 49-second drive with a 12-yard TD to Derrick Mason, and it was 30-24.
Ray Lewis and the Ravens' proud defense came up with their first big stop all day, and Ray Rice's 33-yard run gave Baltimore its first lead 7 seconds after it got the ball back.
Stunned and reeling, the Vikings turned to Favre -- this was just the situation they signed him for two weeks into training camp. He pump-faked and unloaded to Rice, who beat Frank Walker for the 58-yard catch.
But coach Brad Childress played it conservative with three straight runs, and Longwell's 31-yard field goal gave Flacco one more chance with 1:49 to go.
He completed four passes for 35 yards on the drive, but didn't get quite close enough. Hauschka, who auditioned for the Vikings in training camp last year, pushed his kick way left, and the Metrodome crowd went wild.
Sidney Rice had six catches for a career-high 176 yards and Adrian Peterson became the second running back in a row to top 100 against the Ravens' defense. He finished with 148 yards on 22 carries; Baltimore had gone 39 successive games without allowing a 100-yard rusher before Cedric Benson did it last week.
Ray Rice had 10 catches for 117 yards and rushed for 77 more and two scores for the Ravens, who have lost three in a row.
The Vikings' defense was dominant early, forcing the Ravens to punt on their first five possessions as Favre and the offense staked Minnesota to a two-touchdown lead.
But Pro Bowl cornerback Antoine Winfield left in the second quarter with a foot injury, and Flacco started picking apart the depleted secondary in the second half.