Rangers left wing Artemi Panarin during the first period of an...

Rangers left wing Artemi Panarin during the first period of an NHL  game against the Senators at Madison Square Garden on April 9. Credit: Noah K. Murray

After getting an injury scare when his leading scorer, Artemi Panarin, and Panarin’s linemate, Andrew Copp, left Tuesday’s game with upper- and lower-body injuries, respectively, Rangers coach Gerard Gallant decided to make a few changes with his lineup for Wednesday’s game against the Montreal Canadiens at Madison Square Garden.

Mika Zibanejad, Chris Kreider and defenseman Jacob Trouba, all of whom had played in every game this season, were scratched, along with the top defense pairing of Adam Fox and Ryan Lindgren.

And with all that firepower missing from their lineup, the Rangers lost their second game in two nights — and third in a row — to last-place Montreal, 4-3, as defenseman Jeff Petry scored two goals for Montreal, including the winner with 30.7 seconds left in the game.

“You know what, nobody got hurt,’’ Gallant said afterward. “That was the key thing tonight, and we played pretty well overall, and we got through the game. I don’t know if it was exciting for the fans or not but . . . ’’

Montreal ended a nine-game losing streak, while the Rangers lost three in a row in regulation for the first time all season. The only other time they had lost three straight was Nov. 2-6, on the road trip to Western Canada. But two of those losses came in overtime.

Petry’s first goal, with 8.8 seconds left in the second period, gave Montreal a 2-1 lead entering the third period, but Frank Vatrano tied it at 2 at 4:15 of the third period.

Mike Hoffman scored at 12:08 to put Montreal ahead 3-2 but Ryan Strome’s shorthanded goal — his 21st of the season — tied it at 3 at 15:41 of the period.

For Zibanejad, sitting out ended his consecutive games played string at 184 games.

“I don’t care about consecutive games,’’ Gallant said. “The guys don’t care about that. The guys care about Monday coming up, or Tuesday coming up Game 1 of the playoffs]. That’s the bottom line. “I mean, Chris Kreider has 52 goals. The [franchise] record is a couple away. It would be great, but that’s not the most important thing in the world. And they all bought into that.’’

Jaromir Jagr holds the Rangers single-season record for goals with 54, set in 2005-06.

As for the health of Panarin and Copp, Gallant said “there’s nothing to worry about’’ with either player. Panarin left Tuesday’s loss to Carolina early in the second period when the game was still scoreless. Copp, who had just returned to the lineup after missing Saturday’s loss to Boston with a lower-body injury, left after his third shift in the second period with the Rangers trailing 1-0.

After Tuesday’s loss, Gallant said both players were cleared to return by the training staff, but with the playoffs starting next week, he decided to keep them out for precautionary reasons. At the morning skate Wednesday, he said both players will be ready for Game 1 of the playoffs.

“They are not going to play tonight, either one of them, but there’s no concern of them not] playing next week,’’ he said. “They might play Friday against Washington, in the regular season finale]. We’ll decide on that. But if they don’t play Friday, it’s not because they’re going to be injured, or something.’’

One player who returned to the lineup Wednesday was forward Kaapo Kakko, who missed the last four games with a lower-body injury suffered in the 4-0 win over Detroit on April 16. Kakko had missed 31 games with an upper- body injury and was in his fourth game back when he was injured against Detroit.

The 21-year-old Finn had practiced with the Rangers on Monday and according to Gallant he could have played Tuesday, but the team didn’t want him returning to play in a back-to-back situation.

More Rangers