After giving up three quick goals late in the second period to fall behind, the New York Rangers kept their composure. They bounced back in the third and avoided their longest losing streak of the season.

Chris Kreider scored a tiebreaking power-play goal in the three-goal third and the Rangers rallied to beat the St. Louis Blues 5-3 on Wednesday night to snap a two-game skid.

"Being able to dig in and doing whatever it takes to win hockey games," Kreider said of the comeback. "Being able to find our game, being able to forget about a bad shift or a bad period, not let it stack, not let the frustration overcome us. ... Starting to work hard, work for each other, communicate, those are very important things, things that we can build on."

Artemi Panarin had a goal and two assists, and Alexis Lafrenière, Ryan Strome and Patrik Nemeth also scored for the Rangers, who improved to 5-1-1 in their last seven at home. Adam Fox had three assists and Igor Shesterkin finished with 28 saves.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

New York Rangers left wing Chris Kreider, center right, celebrates after scoring the go-ahead goal on St. Louis Blues goaltender Ville Husso (35) during the third period of an NHL hockey game, Wednesday, March 2, 2022, in New York.

New York Rangers left wing Chris Kreider, center right, celebrates after scoring the go-ahead goal on St. Louis Blues goaltender Ville Husso (35) during the third period of an NHL hockey game, Wednesday, March 2, 2022, in New York. (AP Photo/John Minchillo)

"We found a way," Rangers coach Gerard Gallant said. "Igor was outstanding when he had to be."

New York has not lost three in a row in regulation all season, and the Rangers' longest stretch without a win was when they went 0-1-2 in early November.

"Honestly, we don't think about the numbers," Panarin said through a translator. "Two games, three games, every game we have to give 100%. When those statistics come out, you start losing 3-0 in a certain period of time, the team gets steeled to go out there and get those important two points that we need."

Ryan O'Reilly and David Perron each had a goal and an assist, and Ivan Barbashev also scored for St. Louis, which had won four straight. Ville Husso stopped 24 shots in the Blues' first regulation loss in eight games (6-1-1).

St. Louis had 23 shots blocked by the Rangers.

"That's a lot," Blues coach Craig Berube said. "We could do a better job of getting pucks through. Maybe even shooting a little bit more. I think we overpassed at times."

Nemeth, back in the lineup after missing three games for the birth of his son, tied it 3-all with his first goal of the season at 7:27 of the third when his shot deflected off Barbashev's skate on the right side and in while Husso was down on the ice out of position.

Kreider put the Rangers back ahead with 8:20 remaining when he tipped Fox's shot past Husso for his 35th goal of the season. It was his NHL-leading 18th on the power play, the most by a Rangers player since Jaromir Jagr had a franchise-record 24 in 2005-06.

Panarin added an empty-netter with 1:52 left for his 15th of the season.

Trailing 1-0 after one period, the Blues nearly tied it a minute into the second when Brandon Saad's shot squirted through Shesterkin's legs, but Mika Zibanejad stopped the puck before it crossed the goal line to keep St. Louis off the board.

Strome made it 2-0 as he got a pass from Panarin on the left doorstep and put it in between Husso's right pad and the goalpost with 3:24 remaining for his 12th.

The Blues then scored three times on three consecutive shots over a 2:14 span to take the lead. O'Reilly got it started just 54 seconds after Strome's goal as he converted off a pass from Saad on a rush for his 12th.

Barbashev tied it when he beat Shesterkin from the left circle over the goalie's left shoulder for his 17th with 1:23 remaining in the period.

Perron put St. Louis ahead with 16 seconds left as he scored from right circle over Shesterkin's right shoulder for his 12th.

"To give up three goals like that was pretty discouraging," Gallant said.

The Rangers outshot the Blues 8-7 in a first period that saw both teams endure long stretches without a shot on goal.

Lafrenière got the Rangers on the scoreboard at 8:55 as he got the rebound of Fox's shot from the point in front, spun around and put it past Husso on the left side. It was Lafrenière's 13th, topping his total from his rookie season last year.

"He's really focused on the little things. He cares about improving his game and growing as a player," Kreider said of the 20-year-old Lafrenière. "He's getting to the net a lot. He's scoring some pretty goals getting around the crease. ... It's so easy to forget how young he is."

SEEING FAMILIAR FACES

Pavel Buchnevich faced the Rangers for the first time since he was traded to St. Louis in the offseason. Buchnevich had 79 goals and 116 assists in 301 games over five seasons in New York. The Rangers honored the left wing with a brief video tribute during a stoppage in play in the first period. He raised his arm in acknowledgement and received mild applause from Rangers fans.

STATS

The Rangers improved to 21-3-2 when scoring first and 4-12-1 when trailing after two periods. They have 18 comeback wins, tied with Columbus for most in the NHL. ... St. Louis fell to 22-3-2 when leading after 40 minutes.

UP NEXT

Blues: At the New York Islanders on Saturday in the third of four straight on the road.

Rangers: Host the New Jersey Devils on Friday night to finish a three-game homestand.