David Shaw was a part of all the Stanford wins in the previous nine Big Games, as the Cardinal’s offensive coordinator under Jim Harbaugh in 2010 and as the head coach in the ensuing eight.

So after Cal snapped the Cardinal’s streak in a 24-20 decision at Stanford Stadium on Saturday afternoon, Shaw made it clear the loss truly stung.

“I’m hurting for our seniors,” Shaw said. “I feel bad for our seniors. I feel like the rest of us let our seniors down, didn’t allow them to finish their careers here with the Axe.”

Shaw said he told his players “that there should be some pain involved. If you care, you hurt. All that you put into it to try to find a way to come out on top on Saturday, when it doesn’t happen, it’s got to be painful to you, particularly against your rival. …

“That’s something we’ll have to live with for 364 days.”

Said tight end Colby Parkinson: “After nine years, to lose the Axe, it’s a tough pill to swallow. Definitely going to let this one hurt for a while.”

A play involving Parkinson had Shaw mentioning, “It’s a game of inches.”

With the score tied 17-17 late in the fourth quarter, Stanford had a 2nd-and-4 at the Cal 27. Davis Mills tried to hit Parkinson, covered by linebacker Evan Weaver, in the end zone. The pass fell incomplete.

“It was close,” Parkinson said. “I wish I would have been able to get up a little bit. It was just an awkward angle for me to turn around and get two hands on it.”

Stanford then went with a Cameron Scarlett run that netted only a yard. Ryan Sanborn converted a 44-yard field-goal try to put the Cardinal up three, but not seven.

That meant when Chase Garbers capped the Bears’ ensuing 75-yard drive with a 16-yard touchdown run with 1:19 left, Cal owned the four-point margin that would be the difference.

Garbers passed for 285 yards and ran for 72. Stanford linebacker Curtis Robinson said, “Chase Garbers was making a lot of really good plays, important plays for that team. So, hats off to him.”

Still, Robinson thought Stanford’s defense didn’t play up to par.

“I’m just going to go ahead and say that it’s because of our lack of execution,” Robinson said. Cal gained 424 total yards.

For the first time since 2008, Stanford (4-7, 3-6 Pac-12) will lack a bowl game at the end of its season. Stanford still has one more game, at home next Saturday against No. 16 Notre Dame (9-2).

“Coach Shaw after the game said that this next week is all going to be about how strong our character is,” Parkinson said. “If we just want to tap out and get ready in the offseason, try to come back next year strong, it’s going to show poor character.

“But that’s not what we have here. We have a group of guys that are all strong and willing to fight. And that’s what we’re going to do next week.”

Said Robinson: “If we come out and we show that we prepared like we would any other game, with the motivations of any other game, I think that will be a good sign for the program.

“And I don’t expect anything less from our team.”

Mills, a redshirt sophomore who started in place of the injured K.J. Costello, completed 26 of 35 passes for 283 yards with one touchdown and two interceptions.

Mills had one eye on 2020 at Memorial Stadium in assessing Stanford’s loss to the Bears.

“It’s upsetting,” Mills said. “We’ve had the Axe the whole time we’ve been at Stanford. We would have like (to have kept) it here. It’s unfortunate we lost. We’ll come back and get it next year.”

Steve Kroner is a San Francisco Chronicle staff writer. Email: skroner@sfchronicle.com Twitter: @SteveKronerSF