SAN JOSE, calif. — It’s the hockey way: A teammate gets crushed with a big hit, you stand up for him and address the perpetrator. That’s all Ryan O’Byrne was doing Saturday, but referees seemed to forget about hockey’s time-honored code of honor and threw the book at the Avs defenseman instead.

So, not only did the Avalanche lose its young captain, Gabriel Landeskog, for several minutes after taking a huge hit to the head from San Jose Sharks defenseman Brad Stuart, the Sharks received a four-minute power play out of the deal when O’Byrne was called for two instigator penalties. A cascade of bad things continued for Colorado from there, and the Sharks went on to win 4-0 at sold-out HP Pavilion.

The only good news to come out of the game for the Avs was Landeskog’s quick recovery from the hit, which came with 4:20 remaining in a scoreless first period and sent him skating wobbily to the dressing room.

O’Byrne immediately dropped the gloves to fight Stuart, but that got him a two-minute instigator penalty. O’Byrne received an added two minutes for instigating while wearing a facial shield. White-hot Sharks veteran Patrick Marleau was the beneficiary, scoring two goals — at 16:09 and 17:27 — and that was pretty much the game.

“Landy is our franchise player. He’s our captain. We’re talking this year about being team tough and being a hard team to play against, and if they’re going to take a run at our captain, we need to stick up for him,” O’Byrne said. “It’s unfortunate they scored two right away, but we have to stick up for our teammates. It’s a tough call, but you have to live with it and move on. It’s an interesting rule, considering I think we’re trying to get players to wear visors in this league. But it’s the rule and the way the game goes.”

Landeskog, who said he hadn’t seen a replay of the hit when asked about it after the game, returned early in the second period and finished the game with seemingly no damage.

“I thought it was a clean hit — or felt like a clean hit, no elbow or anything. It was hard, I’ll tell you that much,” said Landeskog, who had a sizable shiner under his left eye. “I was kind of reaching for the puck and didn’t brace myself enough. He stepped up and that’s the way hockey goes; you give some and you take some. Tonight, I took a pretty big one.”

Avs coach Joe Sacco had seen replays of the hit, however, and disagreed that it was a clean hit — and he also disagreed strongly that San Jose should have gotten four minutes of power-play time in the aftermath. Sacco thought Stuart should have received a five-minute major for charging, at least.

“It looked like it was a direct blow to the head. It looked like he targeted the head. That was the first point of contact,” said Sacco, which could make it a suspension-worthy offense if NHL discipline chief Brendan Shanahan agrees. “But we didn’t get the call. I don’t know why.”

Not surprisingly, San Jose coach Todd McLellan didn’t see it that way, calling it “a clean hit, in my opinion.”

Stuart saw things this way: “I just saw him kind of cutting in behind Joe (Thornton). I just shaded off Joe and fully expected him to pick his head up, but he didn’t. At that point he was pretty vulnerable, but I just tried to make a good, solid hit. I’m not trying to hurt anyone or anything, but when a guy doesn’t see you coming, it’s going to look pretty bad.”

Avs Recap

The Post’s three stars

1. Patrick Marleau. Sharks veteran tied an NHL record by scoring two goals in each of the first four games to start a season.

2. Joe Thornton. Marleau’s linemate scored a power-play goal and assisted on another.

3. Dan Boyle. Sharks defender was solid in his own end and added two assists.

What you might have missed. Veteran Scott Gomez, who was bought out by Montreal after a disastrous last couple years there and signed with San Jose as a free agent, made his Sharks debut against Colorado and had three shots on goal.

Up next. At Edmonton, Monday, 7:30 p.m.