NEW YORK — Nearly everything was going as planned for the Sabres. Buffalo was playing a solid road game in New York, keeping the normally raucous fans in Madison Square Garden quietly planted in their seats. The Sabres’ defense was keeping the Rangers away from goaltender Ryan Miller, making Drew Stafford’s second-period goal seem destined to be the winner.

Then Patrick Kaleta boarded Brad Richards early in the third period, turning a sedate Sunday night game into a frantic fight for victory.

The Rangers won in a shootout, 3-2, but the Sabres earned a point for the fourth straight game and left the Big Apple happy to be on a 3-0-1 run.

“We keep getting points in games, and that’s what matters,” Sabres right wing Nathan Gerbe said.

Ron Rolston has been delivering equal amounts of praise and criticism of the Sabres since taking over as interim coach. Just before the game, Rolston said he liked the Sabres’ resiliency against adversity but hoped the team could become more disciplined.

A lack of discipline led to a brief lapse in the Sabres’ resiliency — which only allowed them to show their mettle once again.

With Andrej Sekera in the penalty box for hooking early in the third period, Kaleta boarded one of the game’s marquee players, Brad Richards. Kaleta cross-checked the unaware Richards in the back, sending him crashing into the boards. As Richards crumpled to the ice in pain, the referees ejected Kaleta and gave him a five-minute major.

Kaleta couldn’t see the action from the dressing room following his penalty, but he no doubt heard it. The 17,200 fans in the Garden erupted as New York struck for two quick goals to turn a 1-0 deficit into a 2-1 lead.

“I’m glad we made them pay,” New York coach John Tortorella said. “It’s disgusting. It’s a lack of respect.”

Richards eventually left the ice on his own and returned a short time later.

“That’s just stupidity,” Richards said. “If we’re all going to look at each other’s numbers, ram each other from behind headfirst into the boards, it’s going to be a tough game to play.

“He doesn’t play hockey to begin with. It’s the same guy all the time.”

Kaleta was not in the dressing room following the game, and a Sabres spokesman said he would not comment. The right winger is expected to have a disciplinary hearing.

The Rangers needed just seven seconds to score on the five-on-three, circling the puck and setting up Derek Stepan for a tap-in with 3:35 gone to pull into a 1-1 tie. Only 43 seconds later, Rick Nash’s laser from the right circle nicked Ryan Miller’s blocker and went under the goaltender’s arm to make the fans louder.

The Sabres, though, responded before the five-minute penalty had expired. A determined short-handed effort by Steve Ott and Nathan Gerbe, who scored, tied it, 2-2, with 11:41 to play.

“That was a huge play for us to be able to bounce back and get a goal like that,” Rolston said. “After that point we got right back to our game.”

Unfortunately for the Sabres, part of their game is struggling on the power play. Boarding became a theme as Dan Girardi hit Tyler Ennis from behind to join Nash (delay of game) in the box with 54 seconds gone in overtime, giving the Sabres a five-on-three. They failed to capitalize on the two-man advantage and couldn’t strike while one man up, either.

The Sabres went 0 for 5 on the power play and are 3 for 59 in the last 16 games.

After two straight shootout victories, the Sabres lost the breakaway challenge when Nash and Ryan Callahan beat Miller and Henrik Lundqvist stopped Jason Pominville and Ennis. The Sabres then departed for Carolina, where they face the Hurricanes on Tuesday.

“Anytime you take seven of a possible eight points and you do it without having a truly successful power play,” Ott said, “hopefully the next game, once it starts clicking, then the game becomes even that much easier.”