They had a season-high 49 shots and finally got a victory with the last one.

J.T. Miller scored on a wraparound with 1:06 left in overtime, ending a masterful performance by Vancouver goaltender Ryan Miller, to lift the Rangers to a 3-2 victory over the Canucks on Tuesday at Madison Square Garden.

The Canucks didn’t have injured All-Star Henrik Sedin, but they had the red-hot Miller and behind him, the goalposts. The Blueshirts hit iron five times.

Trailing 2-1 in the third period, with 30 shots already, the Rangers pushed frantically for the tie. The Canucks had no shots on Henrik Lundqvist in the period until Radim Vrbata’s at 11:10.

Finally Mats Zuccarello, with his first goal in eight games, redirected a pass from Keith Yandle through Miller, who had lost his stick, with 8:14 left in the third. It was Zuccarello’s first goal in eight games and team-leading 17th.

The Rangers (25-16-5, 55 points) are 17-5-2 at home and they travel to Carolina for their next game on Friday.

Miller, who made 47 saves in a 2-1 shootout win over the Islanders in Brooklyn on Sunday, started building the wall in the first, stopping 17 shots after Yandle’s slapper hit the post just 22 seconds in. The former Sabres netminder then denied Rick Nash, who later also hit iron, and Zuccarello in the first few minutes and robbed Viktor Stalberg on the doorstep on a rebound of Oscar Lindberg’s shot at 5:07.

The Rangers were dominating but the Canucks took the lead. Bo Horvat got around Dan Boyle on a rush, curled behind the net with Marc Staal in pursuit and found Sven Baetrschi with Nash a shade too late to cover and it was 1-0 at 9:02, despite the Blueshirts’ pace.

Miller stopped Derek Stepan with his paddle at the right post about 34 seconds into the second. Chris Kreider’s shot from the right side was kicked aside by Miller, but Nash and Stepan were together in front. Nash got a piece of the puck, and Stepan put it in at 4:18 for the 1-1 tie.

In the second period, Lundqvist sprawled to knock away Baetrschi’s rebound, and on the next rush the other way Alex Biega was whistled for crosschecking Zuccarello at 8:43. On the power play the Rangers came up empty. At 15:23, Jesper Fast’s tip hit the iron and bounced away and it appeared the Rangers were just not getting any breaks .

Then Emerson Etem, in his first game at the Garden since being traded by the Rangers on Jan. 8, passed from the right side to the far post where Alex Burrows redirected the puck for a 2-1 lead at 16:11. Lundqvist angrily smashed his stick on the ice in frustration but the Rangers didn’t change their game, and emerged with two hard earned points.