Baltimore Ravens linebacker Ray Lewis (52) holds the Vince Lombardi...

Baltimore Ravens linebacker Ray Lewis (52) holds the Vince Lombardi Trophy after defeating the San Francisco 49ers 34-31 in Super Bowl XLVII. (Feb. 3, 2013) Credit: AP

NEW ORLEANS -- Never doubt the Poe Boys in this town.

The Ravens take their name from former Baltimore resident Edgar Allan Poe's ornithological poem, and Super Bowl XLVII turned into a spooky tale of its own, complete with a gloomy blackout and a chilling attempt at a comeback. Combine that with the macabre craziness New Orleans is known for, and you had one of the most memorable Super Bowls in history.

Despite letting a seemingly insurmountable 22-point third-quarter lead bleed away to two by the middle of the fourth, the Ravens held on to beat the 49ers, 34-31, Sunday night and earn their second Super Bowl title. They never lost their nerve, and they never lost their lead.

"I tell you what, we don't make it easy," said Ravens quarterback Joe Flacco, who was named MVP of the game. "But that's the way the city of Baltimore is, and that's the way we are."

It was the 49ers' first Super Bowl loss in six appearances. The Ravens won their only other championship game, over the Giants in Super Bowl XXXV.

Justin Tucker's 38-yard field goal with 4:14 left gave the Ravens a 34-29 lead, meaning the 49ers needed a touchdown. They drove inside the 10 in the final minutes, but on fourth-and-goal from the 5, Colin Kaepernick threw a fade pass into the end zone for Michael Crabtree that sailed out of bounds with 1:46 left.

Ravens punter Sam Koch wisely burned seven seconds running around the end zone before taking a safety with four seconds left. The Ravens kicked to the 49ers, but Ted Ginn Jr. could return it only to midfield as the confetti guns exploded.

The result left one team ecstatic over winning the game with a goal-line stand and the other deflated that a year's worth of work came up 15 feet short. The 49ers were closer to a Super Bowl title than a three-point shot in basketball, but they were unable to hit the game-winner.

"All the work we did in the offseason, the whole entire season, everything came down to five yards,'' 49ers tackle Joe Staley said, "and we weren't able to get it done."

"How does it feel to win the Super Bowl?" asked the Ravens' Jacoby Jones, who scored two touchdowns, including the longest play in Super Bowl history. "I feel like Superman."

The Ravens seemed to be cruising toward a second Super Bowl blowout to match their trouncing of the Giants 12 years ago. They led 28-6 early in the third quarter after Jones returned the second-half kickoff 108 yards for a touchdown.

But then things got very strange. It began with the lights in the Superdome dimming to the point that the game had to be halted for 35 minutes. "I didn't care," Jones joked. "I was tired. I was still catching my breath."

Stadium lights cut out on the 49ers' side, then on the Ravens' side. When they returned, the 49ers seemed re-energized as well. They scored 17 points in 4:10 to get back into the game.

The first flicker of life was a 31-yard touchdown pass to Crabtree that was caught at the 15. Cary Williams missed a tackle and Crabtree was able to score to make it 28-13.

After forcing a poor punt by the Ravens that led to a 32-yard punt return by Ginn to the 20, the 49ers needed only two plays to score on a 6-yard run by Frank Gore and make it 28-20.

Then it was the Ravens' turn to give the ball away. Ray Rice, who had only one lost fumble all season, was stripped by Tarell Brown, setting up a 34-yard field goal by David Akers (who got a second chance after missing and drawing a running-into-the-kicker penalty) to make it 28-23.

"You've seen those guys do it," Flacco said of the 49ers, who had trailed by at least seven points in each of their playoff games this season and two weeks ago erased a 17-0 deficit against the Falcons. "They have the ability to score and score quickly, and that's kind of what they did there . . . Boom. Next thing you know, we turn the ball over. Boom. Games can go like that. That's why you have to take care of the football and get first downs."

Tucker kicked a 19-yard field goal early in the fourth, the first time in 11 red-zone trips that the Ravens did not score a touchdown, to give Baltimore a 31-23 lead. But it was still a one-possession game, and the 49ers drove 76 yards in five plays to pull within two points. Kaepernick scored the touchdown on a 15-yard run, the longest scoring dash by a quarterback in Super Bowl history, to make it 31-29 with 9:57 left.

But under pressure from an Ed Reed blitz on the two-point conversion, Kaepernick overthrew Randy Moss and the Ravens held on to the lead.

The Ravens took control early, driving 51 yards on their first possession, capped by Flacco's 13-yard TD pass to Anquan Boldin down the seam. The 49ers rebounded with a drive deep into Ravens territory but had to settle for a field goal that made it 7-3.

The 49ers' best drive of the half was humming along with two passes to tight end Vernon Davis for 40 yards -- Ray Lewis couldn't keep up with him -- and two 8-yard runs by LaMichael James. A third run was stuffed, though, and worse yet for the 49ers, Courtney Upshaw forced a fumble by James that was recovered by Arthur Jones. The Ravens drove for a second touchdown, on a 1-yard pass to Dennis Pitta, for a 14-3 lead midway through the second quarter.

Reed intercepted Kaepernick on the next play, giving the 49ers back-to-back turnovers on offensive snaps. It was the first interception thrown by a 49ers quarterback in a Super Bowl (Joe Montana and Steve Young had 17 touchdown passes in their five previous appearances). But on fourth-and-9 from the 14, the Ravens -- whose head coach is a former special-teams coordinator -- faked a field goal. Tucker took the snap and ran outside, but Darcel McBath and Patrick Willis chased him out of bounds a yard shy of the first down.

That should have swung momentum back to the 49ers, but they ran only three plays and punted. Three plays later, Flacco threw deep for Jones, who had gotten behind cornerback Chris Culliver. Jones caught the ball falling backward at the 8 and Culliver failed to touch him down, so Jones got up and ran into the end zone for a 56-yard touchdown and a 21-3 lead with 1:45 left in the half. The 49ers managed a field goal as time ran out in the half to pull within 21-6.

"Our guys battled to get back in it," Jim Harbaugh said.

Ultimately, though, they came up just those five yards short of a championship.

"We knew it was going to come down to the end," Ravens cornerback Corey Graham said. "We didn't expect it to be a blowout. We knew those guys were going to fight and compete. We said we've got to make plays when they come. We knew it would come down to the end."

Just like any good Edgar Allan Poe story, that's where the heart-pounding stuff is.