MINNEAPOLIS — The finish was just about as good as the Vikings could have imagined: Brett Favre zipped a pass to a little-used reserve wide receiver in the back of the end zone in the final seconds for a classic Favre finish. Greg Lewis leaped for a 32-yard touchdown catch with two seconds left while a flattened Favre watched from his stomach, and the Vikings stunned the San Francisco 49ers 27-24 on Sunday to stay unbeaten. In his first real home game with his new team, Favre overcame a bunch of bad throws and a few more hard hits to his almost-40-year-old body and found that winning touch again. "It’s hard to even recall all of ’em. This one was pretty special,” said Favre, who now has 42 comebacks from fourth-quarter deficits or ties on his career record. An official review confirmed Lewis’s feet were inbounds, sending the sellout crowd into a frenzy. "I’ve had some hard losses. This is just another one for the list,” 49ers cornerback Nate Clements said. "We just have to keep chopping away.” The first five series of the second half: Three punts, Favre’s first interception, and a turnover on downs. The Vikings (3-0), who had gained only 85 yards on Adrian Peterson’s 19 carries, still had three timeouts left and were able to force a punt. They got the ball back at their 20 with 89 seconds remaining. "I didn’t say a whole lot,” Favre said. "I knew what I was thinking: We blew our chances.” Well, not quite all of them. The last play began with 12 seconds left, and Favre stepped forward in the pocket and slid to the right by design to buy time for his receivers to move in position. Instead of throwing a ball up for grabs, he figured he could get close enough to the line of scrimmage to fire a line drive that would be tougher to defend. Lewis watched the quarterback’s eyes, and broke the other way — Favre said he didn’t even know who was running across the end zone — to find room near the right corner. He caught his first pass from Favre, who completed six throws on that drive, and looked forward to the next one. "The offensive line was fired up. Adrian was fired up, and the receivers were fired up. And Brett fell right in. He was fired up, too, like: ‘We’re going to get this done,"’ Lewis said. "And that’s the attitude that we took out there on the field.” That’s exactly why the Vikings wanted to sign Favre so badly. Defensive end Jared Allen was asked what he thought when the offense set up for the final possession. "Be Brett. One time. Just be Brett,” Allen said. Favre finished 24 for 47 for 301 yards and two touchdowns, the most passes he’s thrown in a game since Nov. 11, 2007, when he beat the Vikings while with Green Bay by going 33 for 46 for 351 yards and three touchdowns. The Packers, by the way, are up next. Their defense is surely eager to put some pressure on an old teammate. Favre took plenty of blows from the 49ers (2-1) and listed aches to his right foot, left knee, both shoulders and neck when asked for a report on his health. He was spry enough, though, to throw a pass from his own end zone and sprint upfield past a zig-zagging Bernard Berrian to put his body into linebacker Patrick Willis for a block at the end of that 36-yard catch-and-run.