NEW YORK — Martin Jones and San Jose’s penalty-killing came through to help the Sharks win in a game coach Peter DeBoer said wasn’t one of their best.

Jones stopped 33 shots, and Logan Couture had a goal and an assist to lead the Sharks to a 4-1 victory against the struggling New York Rangers on Monday night. San Jose was whistled for six penalties — all in the first two periods — and didn’t give up a goal on any of the chances.

“We don’t want to take that many penalties but on the plus side our penalty kill was outstanding again,” Jones said. “We’re playing really well I thought 5-on-5 and then it’s just bad turnovers that we can have easily eliminated from our game. … Just a couple little mistakes here and there we can clean up.”

Tim Heed, Joonas Donskoi and Melker Karlsson also scored to help the Sharks win for the third time in four games. Jones got his fourth consecutive win after losing his first two starts.

San Jose is now 30 for 31 on the penalty kill in seven games since giving up three power-play goals in the season opener against Philadelphia.

“Wasn’t one of our better efforts,” DeBoer said. “You can’t come into any building and take six or seven (penalties). We got fortunate our goalie was as good as he was tonight and our PK was good.”

Mika Zibanejad scored and Henrik Lundqvist finished with 20 saves for the Rangers, who fell to 2-6-2 on the season. New York also dropped to 3 for 25 on the power play over the past six games.

“We had plenty of good opportunities,” Rangers coach Alain Vigneault said. “You have to give credit to their goaltender and the group in front of him. When you get close to 20 scoring chances, you should be able to score more than one goal.”

With the Sharks leading 3-0 after two periods, Couture took the puck away from Lundqvist behind the goal and sent it to Karlsson, who put it in for his second of the season at 2:51 of the third. Couture got his 200th career assist on the play.

San Jose turned the puck over in its defensive zone and Zibanejad snapped a shot into the top right corner to spoil Jones’ shutout bid at 4:23 of the final period.

Donskoi increased the Sharks’ lead to 3-0 with 38 seconds left in the second as he skated into the right circle and beat Lundqvist glove-side inside the right post.

The Rangers controlled the play for most of the first period while outshooting the Sharks 16-8, but trailed 2-0 after 20 minutes.

Couture, who had his second career hat trick in a loss at the New York Islanders on Saturday night, got San Jose on the scoreboard 1:56 into the game. With Jones pulled for an extra skater on a delayed penalty, Brent Burns sent pass from the right circle up top to Couture, who fired a slap shot from straightaway past Lundqvist.

Jones had two nice saves on back-to-back attempts in close by Pavel Buchnevich with a little more than nine minutes left in the first.