NEW ORLEANS -- 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).
"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 three quick 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.
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.
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.
Injuries forced 49ers CB Tarell Brown (ribs) and Niners LG Mike Iupati (knee) from the game. Iupati is scheduled to have an MRI on Monday, a source told ESPN NFL Insider Adam Schefter ... Colston also now has 7,930 career yards from scrimmage, breaking Martin's record of 7,865.
Information from The Associated Press was used in this report.
Tom Brady has won his appeal against the NFL, with U.S. District Judge Richard M. Berman criticizing commissioner Roger Goodell for dispensing "his own brand of industrial justice."
Tom Brady wasn't even present for Thursday night's preseason finale between the Patriots and Giants at Gillette Stadium, but he was still the story of the night.
In his weekly radio interview, Patriots president Jonathan Kraft said the team feels vindicated by a federal court decision to overturn Tom Brady's ban and that the team is "ecstatic" for Brady.
Tim Tebow threw two touchdown passes against the New York Jets, his former team, in a strong effort to make the Philadelphia Eagles' 53-man roster.
A week of tumult and controversy continued for the Washington Redskins, who made an off-field stir related to their ticket policy on Thursday before their final preseason game.
Jason Pierre Paul plans to return to the New York Giants next week and the team will examine his hand and make a determination about when he might be available to play, according to a source.