SANTA CLARA >> He stood up, stepped away from the 49ers’ bench, and walked off the field and into the tunnel of Levi’s Stadium.

Then he walked into the 49ers locker room, changed out of his uniform, and exited the facility.

It was the fourth quarter of the Niners’ Thursday Night Football game against the Rams, and San Francisco linebacker De’Vondre Campbell wasn’t injured or ejected from the contest.

No, he simply quit.

His NFL career ended in that moment. He’d leave as the Rams took a 9-6 lead at the start of the fourth quarter. The 49ers’ season effectively ended roughly half an hour later.

After the game, the veteran’s locker still held his gear — shoulder pads, his game pants, and personal effects. They’ll be in a box or bag by tomorrow morning, as the 49ers will surely cut Campbell before this weekend’s games.

Did the Niners lose to the Rams because Campbell didn’t play? Of course not.

Contrary to the impression you might garner from his 13 starts for the Niners this season, Campbell wasn’t a good linebacker. There was a valid reason he was on the bench Thursday. It’s frankly malpractice from the Niners that it took this long to bench him.

But make no mistake: Campbell’s mid-game resignation is an awful look for him and Kyle Shanahan’s program in Santa Clara.

The idea that a professional on this team — even one brought in on overtly mercenary terms — could show up his teammates in such a manner is antithetical to Shanahan’s principles and, ergo, the Niners’.

It’s yet another crack in the Niners’ once-impressive fortress, which, after four NFC Championship Games and two Super Bowl appearances in five years, certainly doesn’t look as imposing anymore.

And it’s another moment of absurdity in this cursed Niners season — another test for a head coach whose opinion carries the most weight in the building outside the owning York family. Since late July, this Niners team has dealt with messy, nasty contract holdouts, a rookie being shot in cold blood on the streets of San Francisco, two star players suffering through the incalculable sorrow that comes from the death of a child, and, on the relatively trivial side, a constant and nearly comical string of injuries and on-field setbacks.

Oh, and his franchise quarterback can’t seem to throw when it rains or snows. What’s up with that?

But while countless players, including Fred Warner (ankle fracture) and Nick Bosa (hip and oblique injuries), played through pain Thursday — Charvarius Ward played through the emotional pain of the death of his daughter, which happened mere weeks ago — Campbell decided that being benched for a superior player (even on one leg) in Dre Greenlaw was too much for him to handle.

“He’s a professional, he’s been playing for a long time,” Ward said. “If he didn’t want to play, he shouldn’t have dressed out — he could have told them that before the game. That was some some selfish s*** that he did. It definitely hurt the team,” Ward said. “He’s probably going to get cut soon.”

We have little idea of what’s happening in these players’ personal lives, so I want to tread lightly here—Campbell could be dealing with something serious at home.

But that’s not how Shanahan framed the issue Thursday, and I’ll have to take the coach’s word on the matter.

No, to have Shanahan tell the story, Campbell quit because his feelings were hurt that he was benched.

“I haven’t lost anybody. (That’s) Somebody that doesn’t want to play football — that’s pretty simple,” Shanahan said. “I think our team and myself, we know how we feel about that. I don’t think we need to talk about him anymore.”

It sure sounds like Shanahan thinks Campbell was being soft.

And that won’t fly on a Kyle Shanahan team.

Right?

We’ll find out.

The last time the 49ers had a lost season under Shanahan, it was during a worldwide pandemic. The 2020 team’s injuries were as prolific as this season’s, but that team was younger and more upstart. They could ride out the waves with the realistic belief that they’d be right back in the mix to win the Super Bowl in the coming years.

They were right.

Those years have now gone. This team’s Super Bowl contention window shut — abruptly and with grand fanfare — this season.

This does not mean it can’t be opened again in 2025 and beyond; it only means that the future success of this operation is far from certain.

The Niners have three games left this season. Their pride is on the line. This is a gut-check moment for Shanahan and his operation.

How the Niners’ decision-makers and team leaders respond will set the franchise’s course for years to come.

And in the coming weeks, we’ll have a much better idea of the big question at hand in Santa Clara:

Does Shanahan’s “stuff” still work?

I mean both as an offensive coordinator — the Niners’ offense was woeful Thursday — and as a head coach and team leader.

Less than a year has passed since this team played overtime in the Super Bowl, yet there are fair and ample reasons to be skeptical.

Can Shanahan push the team past Campbell’s selfishness and Thursday’s season-ending loss and put a quality product on the field in the final three games, two of which will be on national TV (Week 16 vs. Miami and Week 17 on Monday Night Football against the Lions)?

Can the Niners lift whatever curse has been hanging over this team in the final few weeks?

Or is this empire, like so many before it, going to collapse into a pile of rubble; left to be rebuilt by another coach, another regime, in a year or two?

Campbell’s premature retirement was just a symptom of a season that has gone off the rails.

And there’s no guarantee they will get back on them. If Shanahan hasn’t lost the benefit of the doubt already, there’s not much left.

So, I don’t suggest that the Niners have nothing to play for in the final three weeks. They have everything to play for in these games.

The fate of Shanahan’s program hangs in the balance.

“We’re going to find out who wants to be here in the next few weeks,” Nick Bosa said. “We’re going to find out who wants to be a Niner.”