The Rangers arrived at Madison Square Garden on Tuesday to play a hockey game they desperately needed to win. But what happened earlier in the afternoon in the city they call home gave their meeting with the Golden Knights a different kind of importance.

There was a pregame moment of silence held for the victims of the lower Manhattan terror attack that killed at least eight people, but it had been on the Rangers’ minds long before then.

“It was emotional for me before the game,” goalie Henrik Lundqvist said. “I talked to the group a little bit about the importance of this game. For me, my family’s in that area every day. Coming to the game, not knowing if they were safe or not, it was not a good feeling.”

The Rangers wanted to provide a reprieve for at least a few hours Tuesday night and they delivered one in dramatic fashion, coming back from a two-goal deficit in the third period to beat the Golden Knights 6-4.

Mika Zibanejad, who assisted on both goals that wiped away the deficit, scored the winner with 5:47 left in the game. He flung a power-play wrister on net with Chris Kreider screening Golden Knights goalie Maxime Lagace and lit the lamp to send a roar through the Garden.

“It was bigger than the two points today,” Zibanejad said. “We were trying to play for the whole city and all the families involved.”