The San Francisco 49ers have won their NFC Divisional playoff 36-32 against the New Orleans Saints at Candlestick Park.
In an ill-tempered first quarter, the 49ers took the lead thanks to Vernon Davis's touchdown.
Their advantage was doubled in the final minute of the quarter when Michael Crabtree collected Alex Smith's short pass to find the end zone.
The Saints got on the scoreboard five minutes into the second quarter thanks to Jimmy Graham's touchdown.
The visitors were right back in the match soon after as Drew Brees found Marques Colston in the endzone with a 25-yard pass.
It took the 49ers until five minutes into the third quarter to give themselves some breathing space courtesy of a 41-yard field goal following Crabtree's fumble.
Into the final quarter, the Saints made the score 17-20 as John Kasay launched a 48-yard field goal through the posts.
David Akers made a kick of his own to give the 49ers a six-point lead before Darren Sproles turned the game around as his 44-yard touchdown put the Saints 24-23 ahead.
Alex Smith put the 49ers back in front with just over two minutes to play as he touched down in the corner.
There was further drama as Graham scored his second touchdown of the afternoon following Donte Whitner's missed tackle.
However, the 49ers had the final say as Frank Gore scored with 14 seconds remaining to give the hosts a dramatic win.