NEWARK, N.J. — The New Jersey Devils finally have found a winning formula. Just put Mackenzie Blackwood in goal.

Blackwood made 36 saves in winning his fifth straight start and the Devils beat the San Jose Sharks 2-1 in a matchup of struggling franchises on Thursday night.

Blackwood downplays the success, saying his teammates are playing well and he had benefited working with goaltending coach Rollie Melanson.

“He's pretty technically great, so he's helped me out a lot,'' said Blackwood, who is 6-0-1 in his last seven starts. “Helped me with my game and I think as of late, I've been fortunate that we've been getting the results, so I don't think anything will change."

During his winning streak, Blackwood has allowed five goals and posted two shutouts.

“Blackie made some big saves when it was 1-0 (San Jose) to keep it tight,” Devils interim coach Alain Nasreddine said.

Jesper Bratt tied the game 1-all late in the second period and defenceman P.K. Subban scored the winner on a power play early in the third period.

“I'm happy to contribute in a way that helps our team win," said Subban, who has struggled in his first season with the Devils. “I've never been a guy in my career that just looks at the numbers. I want meaningful points and to produce when the game's on the line. Today. I was in that position to shoot a puck and it went in for me."

Defenceman Tim Heed scored for San Jose in the opener of its four-game trip. Martin Jones had 23 saves, including a fantastic stop with the shaft of his stick on Nikita Gusev when the Sharks were playing two men short in the second period.

Gusev assistded on both Devils' goals.

While the Sharks outshot the Devils, their lineup was missing Evander Kane (suspension), Tomas Hertl, Logan Couture and Erik Karlsson (injuries).

“Those are the games where you sort of see the lack of offence , that lack of skill that is out of our lineup," Sharks interim coach Bob Boughner said. “You can get by some nights with it, get a power play goal or get a couple of bounces and you get some puck luck.''

The way Blackwood was playing, the Sharks needed more talent.

Subban's seventh goal of the season came on a shot from above the right circle that beat a screened Jones and broke a 1-all tie at 2:56. It came with the league's best penalty kill unit just 10 seconds away from killing off its fifth straight penalty.

“I think we made some key saves and he gave us a chance to win," Boughner said of Jones. “He looks big and confident in there. I am happy to see that. I think his game has turned the corner.”

Blackwood preserved the win with stops on Radim Simek and Patrick Marleau in close in the waning minutes. He has a 20-12-7 record for a team that has 23 wins.

The Devils tied the game 1-all late in the second period on a breakaway goal by Bratt. The Swede took a pass from Pavel Zacha behind the defence and beat Jones with a neat backhand-forehand move at 16:15.

Heed had given the Shark the lead 7:22 after the opening faceoff with his first goal of the season and first in 44 games dating to almost a year ago. Devils forward Kevin Rooney appeared to tip the point shot past Blackwood.

NOTES: Devils scratched D Will Butcher (lower body) and F Nicholas Merkley (eye). They were hurt against the Blues on Tuesday. ... G Cory Schneider and D Dakota Mermis were recalled from Binghamton (AHL). ... Kane finished his three-game suspension. ... Sharks and Devils will play again in San Jose next Thursday.

UP NEXT:

Sharks: At Rangers on Saturday in second-game of a trip through the New York City metropolitan area and Philadelphia.

Devils: Host Alex Ovechkin and Capitals on Saturday afternoon before starting a five-game trip. Ovechkin is a goal shy of 700.

___

More AP NHL: https://apnews.com/NHL and https://twitter.com/AP_Sports