Kevin Klein and J.T. Miller scored and the Rangers won three consecutive games for the first time since Nov. 15 with a 2-1 defeat of the Devils at Madison Square Garden on Monday.

The Rangers led 2-0 until Travis Zajac scored shorthanded on a 2 on 1 off Keith Yandle’s turnover with 2:17 left in regulation.

Through two periods, the Rangers were quite good playing 5 on 5, but were countered by goaltender Cory Schneider, who made 28 saves on 29 shots, and the Devils blocked 21 shot attempts.

The lone goal was from Klein, whose fourth of the season and first since Nov. 3, came from the lower left circle off a feed from Mats Zuccarello, who beat Seth Helgeson and Adam Henrique, skating to the middle off the right wall. That came at 4:47 of the second, snapping a 27-game drought, and provided a 1-0 lead.

At 4:37 of the third period, after the fourth power play of the evening was unsuccessful, Derick Brassard crossed the blueline and dropped a short pass for the charging Miller, who skated into middle and fired, beating Schneider low stickside. The winger has scored nine goals in the last 10 games.

Lundqvist finished with 27 saves; Schneider had 35.

It was the sixth win the past eight games — and 20th of the season at home — for the Rangers, who visit red-hot Sidney Crosby (22 points in 11 games) and the Penguins on Wednesday for the first time this season.

With Ryan McDonagh concussed from Saturday’s sucker punch from Philadelphia’s Wayne Simmonds, the Rangers played three of their four right-handed defensemen — all except Dan Girardi — on the left side at one time or another during the evening.

Schneider was as positionally solid as he was last week at Prudential Center, when he stopped 31 of 33 in a 3-2 victory. He was particularly effective when the Devils were shorthanded as the Rangers fell to a stunning 2-for-48 on the power play.

The disciplined Rangers were not shorthanded all game; the only time a Blueshirt was in the box was at 3:04 of the first, when Kevin Hayes flipped a broken stick that was lying on the ice over the boards, a 10-minute misconduct.