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.
Kansas City Chiefs QB Patrick Mahomes says more to incident in video of brother pouring water on fan
Patrick Mahomes said there was more to the incident involving his brother Jackson Mahomes after the Chiefs' loss on Sunday night in Baltimore than what was shown on the video making the rounds on social media.
Fantasy football Week 3 shadow report: Key WR/CB matchups
Find out which wide receivers to upgrade, downgrade and avoid for Week 3 in fantasy football, plus a full cheat sheet breaking down every matchup.
Michael Strahan defends Daniel Jones amid Giants' struggles
Michael Strahan joins SportsCenter to discuss his former team and what it will be like to have his No. 92 jersey retired.
DeMarcus Ware, Robert Mathis among 10 first-year nominees for Pro Football Hall of Fame
Defensive standouts DeMarcus Ware and Robert Mathis, and receivers Andre Johnson, Steve Smith and Anquan Boldin are among 10 first-year eligible players nominated for the 2022 Class of the Pro Football Hall of Fame.
Spears: Up to Nagy to get Justin Fields ready to play
Marcus Spears says the onus is on Matt Nagy to help Justin Fields shine as the Bears' starting QB.
Matt Nagy announces Justin Fields will start for Bears
Matt Nagy shares that rookie Justin Fields will start for the Bears while Andy Dalton is sidelined.