The San Francisco 49ers squandered a 28-point lead against an explosive New England Patriots on Sunday but recovered late on to secure a playoffs berth with a thrilling 41-34 road victory.
The 49ers dominated early in rainy New England, racing to a 31-3 advantage in the third quarter but Tom Brady and his top-ranked Patriots offense caught fire with 28 unanswered points to tie the game with a little under seven minutes remaining.
San Francisco's second-year quarterback Colin Kaepernick responded seconds later with a 38-yard touchdown pass to Michael Crabtree, his fourth TD throw of the game, to put the 49ers (10-3-1) back in front for good.
"We just had to put more points on the board," Kaepernick told reporters, of his reaction to New England's comeback.
"Tom Brady is a great quarterback... they're a very potent offense that can put up points. We knew we were going to have to match that today."
After their offense regained control, the visitors' vaunted defense played its part in a lively fourth-quarter as they stalled Brady on two straight drives before David Akers added a San Francisco field goal for a 41-31 lead.
New England (10-4) added a field goal in the final minute but their onside kick attempt was unsuccessful as their seven-game winning streak came to a screeching halt.
Brady finished with 443 yards passing but he coughed up two interceptions and was sacked three times as the Patriots paid the price for giving up four turnovers.
"We battled back, we just made too many mistakes when we needed to make plays," Brady said. "It's a tough loss. You can't play poorly against a good team and expect to win."
Kaepernick had 216 passing yards to improve to 4-1 since taking over as starter from Alex Smith. Kaepernick's favorite target was Crabtree, who had seven catches for 107 yards and two scores.
San Francisco also compiled 181 rushing yards and kept their lead at the top of the NFC West. They can clinch the division with a win over Seattle next week.
With the Patriots coming off an impressive blowout win over Houston last week, the 49ers stunned them by taking early command.
Brady was rushed and hit often by an aggressive pass rush while Kaepernick tossed a TD pass in each of the first three quarters to put the home team in a deep hole.
New England got things going in the third with a long drive that was capped by a Danny Woodhead six-yard TD run, one of his two scores on the day.
Brady made sure New England maintained the momentum with a 41-yard pass to Michael Hoomanawanui that led to a TD, as well as a five-yard scoring strike to Aaron Hernandez.
However, San Francisco dug deep into their reserves and put a stop to Brady when it really mattered.
"We knew it wasn't going to be an easy game even being up at halftime," 49ers safety Donte Whitner said.
"We like playing big teams. No one really gave us a chance (to win). Hopefully we earned some respect tonight." (Writing by Jahmal Corner in Los Angeles; Editing by John O'Brien)