The San Francisco 49ers recovered from a terrible start against the Atlanta Falcons to reach Super Bowl XLVII.
The visitors trailed 17-0 a few seconds into the second quarter, as Julio Jones caught a pair of touchdown passes.
But the 49ers, led by quarterback Colin Kaepernick and star running back Frank Gore, fought back to win 28-24.
Jim Harbaugh's side will meet either the Baltimore Ravens - coached by his older brother John - or the New England Patriots in New Orleans on 3 February.
The Falcons, and wide receiver Jones in particular, raced out of the blocks, scoring on their first three possessions.
Their opening drive culminated in Jones being found, completely unmarked, by quarterback Matt Ryan for a 46-yard touchdown.
Kicker Matt Bryant, who
booted the winning field-goal from 49 yards last week
with only 13 seconds remaining of their divisional play-off against Seattle, then successfully converted a 35-yard effort to make it 10-0.
The Falcons fans could barely believe how well their side were playing, and things got even worse for the Niners at the start of the second quarter when Jones spectacularly caught another perfectly thrown Ryan pass at the back of the endzone.
Julio Jones scores his second touchdown for Atlanta
The 49ers, who were
narrowly beaten by eventual Super Bowl champions New York Giants
at the same stage last season, then finally managed to get going offensively.
After a 10-play, 65-yard drive, LaMichael James jinked his way through the Falcons defence to reduce the deficit to 10.
That inspired his quarterback, Colin Kaepernick, who soon afterwards connected with Vernon Davis to make it 17-14.
But just when the Niners thought they were going to head into the locker room only three points behind, Ryan - who passed for 271 yards in the first half, compared with Kaepernick's 90 - found Tony Gonzalez from 10 yards for his third touchdown pass.
San Francisco, however, began the second half as Atlanta had started the first, with their all-time rushing leader running in from five yards.
Having regained the momentum, the 49ers were left kicking themselves when they failed to capitalise on the game's first turnover, when Ryan's errant pass was picked off by Chris Culliver.
Veteran kicker David Akers, who missed 13 of his 42 attempts in the regular season - considerably worse than the NFL average - blew his chance to level the scores when his 38-yard attempt struck the top of the left upright.
On Atlanta's next possession, though, Ryan fumbled a snap while deep in San Francisco territory. Aldon Smith gleefully pounced on the loose ball and Kaepernick marched his team all the way down to the Falcons' one-yard line before receiver Michael Crabtree, in attempting to dive into the endzone, had the ball knocked from his grasp.
Respite was brief for the hosts though, with Gore completing the 49ers' next drive by running in for his second touchdown to give San Francisco a 28-24 lead with 8:23 remaining.
The Falcons desperately tried to respond but for once the Niners defence held firm to book San Francisco their sixth Super Bowl appearance, and their first since 1995.