SANTA CLARA, Calif. -- Philip Rivers looked at the 21-point deficit on the scoreboard at halftime and even he wondered whether the San Diego Chargers had it in them to come back. The season depended on it, so Rivers took charge.
He prevailed through a balky back and a sore chest to keep San Diego's slim playoff chances alive, rallying his team to tie it in the final minute and setting up Nick Novak's 40-yard field goal nearly 5 minutes into overtime in a 38-35 victory over the San Francisco 49ers on Saturday night.
"Obviously, an unbelievable finish," coach Mike McCoy said. "We had about as bad a first half as we could possibly play. ... You saw a lot of emotion on the sideline throughout that second half -- the excitement, the energy, the way we play football."
He completed his fourth touchdown pass of the day with a tying 11-yard TD pass to Malcom Floyd with 29 seconds left in regulation after completing a pair of fourth-and-longs as the Chargers (9-6) forced overtime.
"What a comeback. It's one of the greatest I've been a part of, and it keeps us alive," Novak said. "To kick the game winner, do-or-die kick ... loved being in that moment."
He shined with the season on the line. The Chargers came in needing to win out and get some help after beginning the week tied with Kansas City and Buffalo, one game out of the final wild-card berth. San Diego ends the season at Kansas City next Sunday.
Rivers converted fourth-and-8 and fourth-and-10 on the key final San Diego drive of the fourth quarter.
"We just got going and fell into a rhythm," Rivers said. "At halftime, we didn't know if we could come all the way back, but we were going to fight. That's who we are."
The 49ers blew just their second game when leading by 21 or more at halftime and lost their fourth straight game under embattled coach Jim Harbaugh. They lost 42-41 to Minnesota on Oct. 24, 1965, after leading 35-14 at halftime.
"Right now there's not much to say," Harbaugh said. "That's a tough one."
Rivers threw touchdown passes of 21 and 1 yard to Gates and another to Royal, but also was hurt by three interceptions. On one of those, Antoine Bethea had a 49-yard return for his first career touchdown. A defense minus recently released starting lineman Ray McDonald never let Rivers find a rhythm.
The 31-year-old Gore finished with 158 yards and he needs 38 yards in the final game next weekend against Arizona for a fourth consecutive 1,000-yard season and eighth in his 10 NFL seasons. His scoring run was his longest since a 64-yarder on Nov. 1, 2009, at Indianapolis. It also was the longest TD run allowed by San Diego since 2010 before Kaepernick topped it.
Gore had more yards in this game than in his previous four games combined, and New York Yankees star Alex Rodriguez was in attendance wearing the running back's red No. 21 jersey.
Rookie Bruce Ellington caught an 8-yard touchdown pass from Kaepernick early in the second quarter that put the Niners up 21-0, then ran for a 1-yard score late in the half before leaving with a hamstring injury.
Rivers, 33-for-54 for 356 yards, sat out Wednesday's practice with chest and back injuries.
"We've got the best quarterback in the league," Floyd said. "We had faith in us."
Harbaugh, who is facing a constant swirl of speculation about his future -- like a report alma mater Michigan has made him a six-year offer to coach the Wolverines -- has said there's still plenty to play for, like a winning season despite the disappointment following three straight trips to the NFC championship game.
Four players sustained concussions or head injuries -- 49ers safety Eric Reid and San Diego cornerback Shareece Wright with concussions and San Francisco cornerback Leon McFadden and linebacker Aldon being evaluated for head injuries.
San Diego CB Steve Williams suffered a knee injury and C Chris Watt hurt an ankle. ... 49ers RT Anthony Davis returned for the first time since Nov. 9 after missing four games with a concussion. ... 49ers CB Perrish Cox made his fifth interception, moving him into a tie for third place in the NFC. ... 49ers S Bubba Ventrone and WR Brandon Lloyd suffered groin injuries.
Jimmy G and Kittle headline Week 3 injury report
Stephania Bell runs through which players are on and off the injury list for Week 3.
Who will win star-studded MNF matchup?
Marcus Spears and Mina Kimes both pick the Ravens to hand the defending Super Bowl champion Chiefs their first loss of the 2020 season.
Spears, Kimes doubt Lions pull out Week 3 win vs. Cardinals
Marcus Spears and Mina Kimes explain why they expect Kyler Murray to dismantle the Lions for a Cardinals win in Week 3.
Panthers, Chargers set to battle in Los Angeles
Mina Kimes and Marcus Spears both like the Chargers to beat the Panthers when they meet in Los Angeles Sunday afternoon.
Spears doesn't hesitate with Jets-Colts pick
Marcus Spears doesn't hesitate in picking the Colts due to a lack of confidence in the Jets, while Kimes points to New York's banged-up roster when taking on Indianapolis.
Kimes, Spears disagree on outcome of Texans vs. Steelers
Mina Kimes likes the Texans to grab their first win of the year while Marcus Spears thinks the defense of the Steelers will be too much for Houston.