The Sabres, who’ve toppled at the slightest of breezes all season, stood toe-to-toe with an NHL hurricane Tuesday night. Buffalo and San Jose traded roundhouse blows and devastating counterpunches, a fight the Sabres had yet to deliver and one San Jose certainly could not have expected.

When it ended, the Sabres won more than just a game.

Buffalo earned a 5-4 shootout victory, a generous portion of respect and a heaping mound of self-esteem after dropping one of the league’s best. Cody Hodgson scored the shootout winner and Ryan Miller made 47 saves after facing a career-high 51 shots.

It was a statistical mismatch on paper, a game featuring one of the NHL’s powerhouses and the league’s worst. Everything that San Jose normally does right is something that Buffalo typically does wrong.

For at least one night, it didn’t matter.

“It’s huge,” said right wing Drew Stafford. “Even the way we won, we didn’t take the easy way out. We definitely made it interesting, but we weathered their storm because they’re a heck of a team over there. They wanted to take the game back, and we were able to weather it and get the win.”

The teams combined for five goals in a wild third period that saw Buffalo build leads of 3-1 and 4-3. San Jose erased them both, the final time with only 3:46 to play, to create extra-time drama in SAP Center.

Buffalo improved to 3-13-1 and ended a four-game losing streak. San Jose dropped to 10-1-4.

“It was up-and-down, lot of offense in it, and we were able to score some goals,” Sabres coach Ron Rolston said. “It’s good for the guys.”

They may have finally learned to handle adversity, too.

Tyler Ennis gave the Sabres their second two-goal lead of the season, scoring on the power play with 1:20 gone in the third. Matt Moulson and Hodgson started the tic-tac-toe passing play, leaving Ennis with an opening net and a 3-1 lead.

The advantage evaporated as quickly as the noise level skyrocketed. San Jose scored twice in 1:10 to tie the game at 3-3.

Tyler Kennedy got the Shark Tank buzzing, burying the puck after Miller kicked a rebound to the front.

Rookie sensation Tomas Hertl brought the crowd of 17,562 to its feet again with 15:31 to play. Miller couldn’t freeze a shot at the right side of his crease, and Hertl swooped in to steal it. He traveled around the cage and fired into the net for his ninth goal.

The Sabres refused to fold. Defenseman Henrik Tallinder picked up a puck at the top of the circles with 12:32 left and went five-hole, giving the Sabres a 4-3 lead and their third goal between Antti Niemi’s pads.

An extraordinary effort by Tommy Wingels tied the game with 3:46 to play. Hertl failed in his attempt to jam the puck home, but Wingels dived into the crease to get his stick on the loose puck.

The Sharks appeared to score in overtime, but defenseman Tyler Myers kicked the puck out of the net before the referee could see it or NHL officials in Toronto could review it.

“Yeah, there was some mistakes out there on our side, but don’t get down after that,” Tallinder said. “It’s what do we do after the mistakes are made, and I thought that was the biggest step in my eyes was to see what we did after the mistakes. I thought we did it like nothing happened. We stood up for ourselves.”