SANTA CLARATheir season lost, their team in flux, and their coach with one foot out the door, the San Francisco 49’ers put forth their most complete half of football since their week one victory over Dallas.

Then came the collapse.

After jumping to a 21-point halftime lead over the San Diego Chargers, San Francisco faltered at home, losing 38-35 in heartbreaking fashion.

The loss, the fourth straight for Jim Harbaugh and the Niners, had an entirely different feel from the previous three. Prior to Saturday night, San Francisco could point to a stagnant offense in three losses in which they totaled a measly 23 points.

Consistently resilient in an injury-ravaged season where the offense couldn’t get out of its own way, San Francisco’s defense scored as many points as Phillip Rivers and the Chargers’ explosive offense, scoring a touchdown on an interception return by safety Antoine Bethea.

And unlike past weeks, the 49ers and quarterback Colin Kaepernick rekindled their explosiveness of old, lighting-up the scoreboard with touchdowns runs of 90 and 52 yards by Kaepernick and Frank Gore, respectively.

But sparked by a second-half fumble by Kapernick, resulting in a San Diego touchdown, the Chargers mounted a furious comeback.

A season-saving effort was defined by timely defense and clutch passes from Rivers, punctuated by the quarterback’s game-tying touchdown pass to Malcolm Floyd with 29 seconds remaining in regulation.

A subsequent overtime fumble by San Francisco receiver Quinton Patton set the stage for San Diego’s Nick Novak to kick through the winning points from 40 yards out, as the Chargers managed what San Francisco could not down the stretch, scratching and clawing to keep their playoff hopes alive for another week.

“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.”

Sunday’s match-up with the toiling, playoff-bound Arizona, will very likely be Harbaugh’s last appearance on the Niners’ sideline, and mounting reports suggest that Harbaugh is headed for a coaching job with either the Michigan Wolverines or the crosstown Oakland Raiders.

Michigan, Harbaugh’s alma mater, may very well be gaining traction, taking their courtship of the head coach to a public level today with a birthday tweet to the coach.

"Happy Birthday, Jim. #GoBlue"
“Happy Birthday, Jim. #GoBlue”