Lights Out: Ravens Beat 49ers 34-31 in Super Bowl Baltimore Ravens inside linebacker Ray Lewis holds up the Vince Lombardi Trophy after his team defeated the San Francisco 49ers in the NFL Super Bowl XLVII football game in New Orleans, Feb. 3, 2013. (NEW ORLEANS) - From blowout to blackout to shootout, Joe Flacco and the Baltimore Ravens had just enough to survive one of the most electric Super Bowls ever. The outage flipped a switch for the San Francisco 49ers, but the Ravens used a last-gasp defensive stand to hold on Sunday night, 34-31. America's biggest sporting event came to a half-hour standstill in the third quarter when most of the Superdome lights and the scoreboards went dark. By then, the Ravens had a 22-point lead. Everything changed after that, though, and the 49ers staged a sensational rally before Ray Lewis and Co. shut it down. But there were plenty of white-knuckle moments and the Ravens (14-6) had to make four stops inside their 7 at the end. For a Super Bowl with so many subplots, it almost had to end this way. Flacco's arrival as a championship quarterback coincides with Lewis" retirement - with a second Super Bowl ring no less. The win capped a sensational month since the star linebacker announced he was leaving the game after 17 Hall of Fame-caliber years. MORE: Best photos from the super bowl The sibling rivalry between the coaching Harbaughs went to John, older than Jim by 15 months. How could it be any other way? It's never pretty. It's never perfect. But it's us," John Harbaugh said. It was us today. At 4 hours, 14 minutes, it was the longest Super Bowl ever. Among the most thrilling, too. The loss of power delayed the game 34 minutes and left players from both sides stretching and chatting with each other. It also cost Baltimore whatever momentum it built, and that was considerable after Jacoby Jones" 108-yard kickoff return and game MVP Flacco's three touchdown passes made it 28-6. Back came San Francisco (13-5-1) in search of its sixth Lombardi Trophy in as many tries. Michael Crabtree's 31-yard touchdown reception on which he broke two tackles made it 28-13. A couple minutes later, Frank Gore's 6-yard run followed a 32-yard punt return by Ted Ginn Jr., and the 49ers were within eight. Ray Rice's fumble at his 24 led to David Akers" 34-yard field goal, but Baltimore woke up for a long drive leading to rookie Justin Tucker's 19-yard field goal. San Francisco wasn't done challenging, though, and Colin Kaepernick's 15-yard TD run, the longest for a quarterback in a Super Bowl, made it 31-29. A 2-point conversion pass failed when the Ravens blitzed. Tucker added a 38-yarder with 4:19 remaining, setting up the frantic finish. Kaepernick couldn't get the Ravens into the end zone on the final three plays - there was contact on Crabtree on the final pass that appeared incidental, and Jim Harbaugh insisted it was holding. Ravens punter Sam Koch took a safety for the final score with 4 seconds left. His free kick was returned by Ginn to midfield as time ran out. The Harbaughs then met at midfield amid the Ravens" confetti-laden celebrations. "It's very tough," John Harbaugh said of their conversation. It's a lot tougher than I thought it was going to be. It's very painful. In the first half, Flacco was as brilliant as Tom Brady, Joe Montana or Terry Bradshaw ever were in the NFL's biggest game. The only quarterback to win a playoff game in each of his first five seasons - his coach holds the same distinction - was nearly perfect. Overall, Flacco threw for 11 touchdowns to tie a postseason record, and had no interceptions. The Ravens stumbled into the playoffs with four defeats in its last five regular-season games as Lewis recovered from a torn right triceps and Flacco struggled. Harbaugh even fired his offensive coordinator in December, a stunning move with the postseason so close. But that - and every other move Harbaugh, Flacco and the Ravens made since - were right on target. Just like Flacco's TD passes of 13 yards to Anquan Boldin, 1 to Dennis Pitta and 56 to Jones in the first half, tying a Super Bowl record. New Orleans native Jones, one of the heroes in a double-overtime playoff win at Denver, seemed to put the game away with his record 108-yard sprint with the second-half kickoff. Soon after, the lights went out - and when they came back on, the Ravens were almost powerless to slow the 49ers. Until the final moments. PHOTOS: Beyoncé Rocks the Superdome, Reunites with Destiny's Child "The final series of Ray Lewis" career was a goal-line stand," Harbaugh said. Lewis sprawled on all fours, face-down on the turf, after the end zone incompletion. "It's no greater way, as a champ, to go out on your last ride with the men that I went out with, with my teammates," Lewis said. And you looked around this stadium and Baltimore! Baltimore! We coming home, baby! We did it! It was a bitter loss for Jim Harbaugh, the coach who turned around the Niners in the last two years and brought them to their first Super Bowl in 18 years. His team made a similarly stunning comeback in the NFC championship at Atlanta, but couldn't finish it off against Baltimore. "Our guys battled back to get back in," said the 49ers coach, who was especially upset about the non-call on the pass to Crabtree. The 49ers couldn't have been sloppier in the first half, damaging their chances with penalties - including one on their first play that negated a 20-yard gain - poor tackling and turnovers. Rookie LaMichael James fumbled at the Baltimore 25 to ruin an impressive drive, and the Ravens converted that with Flacco's 1-yard pass to Pitta for a 14-3 lead. On San Francisco's next offensive play, Kaepernick threw behind Randy Moss and always dependable safety Ed Reed picked it off. A huge scuffle followed that brought both Harbaughs onto the field and saw both sides penalized 15 yards for unnecessary roughness. Reed, also a New Orleans native, tied the NFL record for postseason picks with his ninth. Baltimore didn't pounce on that mistake for points. Instead, Tucker's fake field goal run on fourth-and-9 came up a yard short when Chris Culliver slammed him out of bounds. The Ravens simply shrugged, forced a three-and-out, and then unleashed Jones deep. Just as he did to Denver, he flashed past the secondary and caught Flacco's fling. He had to wait for the ball, fell to the ground to grab it, but was untouched by a Niner. Up he sprang, cutting left and using his speed to outrun two defenders to the end zone. Desperate for some points, the 49ers completed four passes and got a 15-yard roughing penalty against Haloti Ngata, who later left with a knee injury. But again they couldn't cross the goal line, Paul Kruger got his second sack of the half on third down, forcing a second Akers field goal, from 27 yards. When Jones began the second half by sprinting up the middle virtually untouched - he is the second player with two TDs of 50 yards or more in a Super Bowl, tying Washington's Ricky Sanders in 1988 - the rout was on. Then it wasn't. The Ravens" thrilling victory provided a grand finale for the Big Easy, which hosted its first Super Bowl since 2002 and first since Hurricane Katrina ravaged the city. But it's been a tough year for local fans. A bounties scandal and resultant suspensions helped ruin the Saints" season almost before it began, making Commissioner Roger Goodell the city's Public Enemy No. The season also was marred by a lockout of the on-field officials that turned farcical when replacement refs couldn't handle the job. Even Super Bowl week was disrupted by reports that deer-antler spray, of all things, might have been used by NFL players as a performance enhancer. And then the NFL's showcase event was stopped cold by a lack of power. Flacco, though, provided plenty of sizzle. PHOTOS: A History Of Super Bowl Halftime Shows