Saints beat 49ers 23-20, Hartley FG on last playNew Orleans Saints kicker Garrett Hartley (5) kicks the game winning field goal in the second half of an NFL football game against the San Francisco 49ers in New Orleans, Sunday, Nov. 17, 2013. The Saint won 23-20. (AP Photo/Bill Haber)
NEW ORLEANS (AP) -- Staggered by a shoulder pad to the head and ripped down by a forearm hit across the neck, Drew Brees was crumpled on the turf with blood on his chin.
Yet the vicious sack by San Francisco's Ahmad Brooks also drew a flag that canceled out Brees' lost fumble with 3:12 left and gave the Saints' prolific quarterback one chance too many.
Brees guided New Orleans to two late Garrett Hartley field goals - the second as time expired - and the Saints upended the 49ers 23-20 on Sunday.
''All I remember is just getting clothes-lined in the chin and as I'm on the ground, I'm saying, 'That's got to be a flag,''' Brees said. ''One of my teammates kind of picked me up and said, 'Are you all right?' and he said, 'Don't worry, there's a flag.'
''I said, 'All right, good.' Just took a moment, and you've got to get ready to go.''
The Superdome crowd grumbled each time the Saints settled for high-pressure field goals in the fourth quarter, apparently nervous that Hartley, who'd missed four of six attempts in the previous three games, would slip up again.
Instead, Hartley made all three of his field goal attempts in the final quarter to wipe out New Orleans' 20-14 deficit.
His 42-yarder with 2:06 left tied it. His game-winner was from 31 yards. He also hit from 21 yards earlier.
''This team and this coaching staff and this organization never took their foot off the gas with me and here we are sitting at 8-2 and getting ready for Atlanta,'' Hartley said.
The Saints trailed 20-17 when Brooks leveled Brees. The Niners protested the resulting flag vigorously.
''It was very frustrating. The game could have gone a totally different direction than what it went,'' Brooks said. ''I was just mad because that was a big play in the game. We lost, and that's probably the reason why.''
The Saints (8-2) improved to 6-0 at home despite three turnovers and a failed fourth down conversion.
''You're going to have games like this,'' Brees said. ''You still find way to win against a playoff-caliber opponent with a lot at stake at this point in the season. That says a lot.''
The victory guaranteed the Saints would remain at least a game ahead of Carolina - which plays Monday night - for first place in the NFC South. It also kept New Orleans one game in the loss column behind top NFC seed Seattle (10-1).
Marques Colston finished with five catches for 80 yards to become the Saints' all-time leader in yards receiving with 7,923, passing Eric Martin's two-decade-old mark of 7,854.
''It's definitely an awesome accomplishment,'' said Colston, a 2006 seventh-round draft choice out of Hofstra. ''It had a lot to do with some of the guys in this locker room and this coaching staff, but we're in the midst of something a lot more meaningful right now.''
Colin Kaepernick passed for two scores, but finished with only 127 yards and was sacked three times as the Niners (6-4) lost their second straight.
''The greater the challenge, the greater the glory,'' Niners coach Jim Harbaugh said. ''That's the way I look at it. I'm proud of our guys for the way they fight, and if we continue to do that, we're going to win a lot of games.''
The Saints' defense, one of the worst in NFL history a year ago, played well enough to keep the Saints within striking distance despite what appeared to be a number of seemingly costly mistakes. Junior Galette's sack helped stall the Niners' last drive.
Niners running back Frank Gore managed only 48 yards on 13 carries.
Kaepernick completed 17 of 31 passes and scrambled three times for 25 yards. His last run was a 16-yarder on third-and-long that came up 3 yards short of a first down with less than two minutes to go.
Brees completed quick three passes on his final series: a 9-yarder to Graham, the 20-yarder to Colston and then another 12-yarder to Graham.
Brees finished 30 of 43 for 305 yards and one touchdown, a 3-yard connection with rookie tight end Josh Hill.
That was enough to overcome New Orleans' turnovers, which began with Lance Moore's muffed fair catch, setting up an 11-yard touchdown drive capped by Kaepernick's pass to Anquan Boldin.
Boldin was covered by Corey White, who'd come in after what appeared to be a serious left leg injury to Jabari Greer. White briefly made up for it with a diving interception, but when he tried to run for a score, he fumbled the ball through the end zone for a touchback.
The Niners then drove for Phil Dawson's 55-yard field goal, which gave them a 10-7 lead.
New Orleans regained the lead at 14-10, thanks to Travaris Cadet's 82-yard kickoff return, which set up Jed Collins' 1-yard touchdown run.
But in the third quarter, Brees, scrambling right, tried to lob a pass to Graham, only to have Brooks leap up and tip the ball to himself for an interception he returned to the Saints 22.
Soon after, Vernon Davis' 17-yard TD catch made it 17-14.
NOTES: Injuries forced 49ers CB Tarell Brown (ribs) and Niners LG Mike Iupati (knee) from the game. ... Colston also now has 7,930 career yards from scrimmage, breaking Martin's record of 7,865.
AP NFL website: www.pro32.ap.org