BOSTON -- David Pastrnak scored the go-ahead goal 5:06 into the third period, and the Boston Bruins extended their longest winning streak of the season to four games with a 4-3 win against the Pittsburgh Penguins at TD Garden on Friday.
Riley Nash sprung Pastrnak for a breakaway, and the right wing scored with a backhand-to-forehand move.
"It's a great team to beat," Pastrnak said. "Every year, they gave us a tough time in the season when we play them. It's a big win, and we're doing some good stuff right now the last (few) games. We just need to keep doing it."
[WATCH: All Penguins vs. Bruins highlights]
David Krejci, Sean Kuraly and Matt Grzelcyk scored, and Anton Khudobin made 17 saves for the Bruins (10-7-4). The goalie is 7-0-2 this season.
Video: PIT@BOS: Krejci buries fantastic dish from DeBrusk
The Bruins had a 3-1 lead before the Penguins tied it 3-3 in the second period.
"We did talk about a couple things, especially the neutral zone, don't give them too much room with speed because they've got really dangerous players," Krejci said about the adjustments before the third period. "So we had to manage the puck really well. I thought we did that really well."
Jake Guentzel, Phil Kessel and Sidney Crosby scored, and Matt Murray made 29 saves for the Penguins (11-10-3), who lost a third straight game and for the fifth time in seven games (2-4-1).
The Penguins outshot the Bruins 8-5 in the third period.
Video: PIT@BOS: Crosby fights to jam home the rebound
"Well, it's discouraging because it wasn't a perfect game by any stretch," Penguins coach Mike Sullivan said. "I thought the third period was one of our stronger periods and we end up giving up a breakaway when we controlled most of the territory and most of the zone time. So from that standpoint, that was the only real quality scoring chance they got the whole period and it ended up in the back of our net."
Krejci scored his second goal of the season to put the Bruins ahead 1-0 at 6:13 of the first period. After Peter Cehlarik stole the puck from Guentzel, Jake DeBrusk found Krejci in front for the goal.
Kuraly extended the lead to 2-0 at 10:51 with a one-timer from the top from the top of the right circle after a cross-ice pass from Charlie McAvoy, who stole an outlet pass and circled the net.
Guentzel got the Penguins within one with a power-play goal at 1:02 of the second period before Grzelcyk scored his first NHL goal, beating Murray to the glove side at 10:31 to give the Bruins a 3-1 lead.
"It's pretty special obviously," said Grzelcyk, a native of Charlestown, Massachusetts, whose father John works at TD Garden and was in attendance. "It brings back memories skating as a kid and stuff like that. Hasn't really sunk in yet."
Video: PIT@BOS: Grzelcyk nets first NHL goal from the dot
Kessel scored on a wrist shot to the short side at 14:07 of the second period to make it 3-2.
Pittsburgh tied the game 3-3 with 2:16 left in the second on Crosby's goal, which the Penguins captain scored by sweeping the puck off Khudobin's stomach when the goaltender was on his back. The play was reviewed twice, first to find out when the whistle blew. After it determined that the puck was entering the net as the whistle blew, the Bruins challenged the play for goaltender interference, but the goal was upheld after video review.
Goal of the game
Pastrnak's game-winner at 5:06 of the third period.
Video: PIT@BOS: Pastrnak scores a slick breakaway goal
Save of the game
Khudobin's save on Kessel's wrist shot with 7.5 seconds remaining.
Video: PIT@BOS: Khudobin comes up with clutch pad stop
Highlight of the game
Kuraly's goal at 10:51 of the first period.
Video: PIT@BOS: Kuraly one-times a sweet dish from McAvoy
They said it
"What happened in the first? We got outplayed. They played harder than we did." -- Penguins coach Mike Sullivan on the Bruins outshooting them 14-4 and taking a 2-0 lead in the first period
"I mean, you know a slow last couple of games offensively, but those goals are going to come. I'm not worrying about it. The goals are going to come and offensive plays too." -- Bruins forward David Pastrnak, who scored his first goal in six games
Need to know
Penguins center Evgeni Malkin (upper body) didn't travel here and missed his second straight game. ... Crosby played his 806th NHL game, tying Jaromir Jagr for second place on the Penguins' all-time list. Patric Hornqvist played his 600th NHL game. ... Penguins forward Carter Rowney (hand) returned to the lineup after missing 14 games. ... Bruins forward Brad Marchand (undisclosed) missed his fifth straight game and is day to day. ... Grzelcyk became the seventh Bruins player to score his first NHL goal this season (DeBrusk, McAvoy, Kuraly, Cehlarik, Danton Heinen and Anders Bjork). ... Boston is 5-0-1 in its past six home games against Pittsburgh.
Penguins: Host the Tampa Bay Lightning on Saturday (7 p.m. ET; ATTSN-PT, SUN, NHL.TV)
Bruins: Host the Edmonton Oilers on Sunday (5 p.m. ET; NHLN, SN, TVA Sports, NESN, NHL.TV)
Video: Krejci, Pastrnak propel Bruins to 4-3 victory