BOSTON -- David Pastrnak scored with 46.9 seconds remaining in overtime, Brad Marchand had two goals, and the Boston Bruins ended their four-game losing streak with a 4-3 comeback win against the Detroit Red Wings at TD Garden on Tuesday.
Pastrnak hadn't scored in 17 games, since Dec. 14 at the Pittsburgh Penguins, but said he wasn't feeling too much pressure to score his 20th goal for the first time in his NHL career.
"There's not much you can do. You've got to play the right way," Pastrnak said. "Obviously it's always going to be back in your head, but like I said, guys help me and try to support me all the time. But also when I had that stretch with a lot of goals I said that might happen that you won't score for a couple games. It was more than a couple, but it's nice to get the one and especially with the win."
WATCH: All Red Wings vs. Bruins highlights
The Bruins (24-21-6) had been 0-3-1 in their past four games. They won for the second time in 21 games (2-16-3) when trailing after two periods after Marchand tied the score 3-3 8:20 into the third period.
"It was frustrating the way we were playing, we were playing good and we were down," said Marchand, whose second goal made it 3-3 at 8:20 of the third period. "So it was a little frustrating but we showed a ton of character tonight, coming out and getting that win."
Tuukka Rask, who left in the second period of a 5-1 loss at the Pittsburgh Penguins on Sunday because of a migraine headache, made 23 saves.
Jared Coreau made an NHL career-high 45 saves, and Andreas Athanasiou, Mike Green and Tomas Tatar scored for the Red Wings (20-19-9). Henrik Zetterberg had two assists.
Video: DET@BOS: Marchand puts in a rebound on the doorstep
Detroit has lost its past three games in overtime.
"I mean, it's imperative that we get those extra points," Green said. "Right now, not just good enough to get that point. It doesn't sting but we've got to try to find a way to get it done in regular time because obviously things aren't bouncing our way in overtime."
Defenseman Kevan Miller scored his first goal in 42 games, since Feb. 28, 2016, to give Boston a 1-0 lead at 3:39 of the first period.
It took Detroit 10:59 to get its first shot on net but that shot was a goal by Athanasiou, who beat Rask on a breakaway to tie the score.
Boston took a 2-1 lead on Marchand's power-play goal at 17:34.
The Red Wings tied it 2-2 in the second period when Green's soft slap went off Miller and in at 6:25.
Tatar scored on an end-to-end rush at 10:51 for a 3-2 Detroit lead.
Video: DET@BOS: Tatar wires home a wrister from the circle
Goal of the game
Marchand and Patrice Bergeron worked a give-and-go after entering the Detroit zone. Marchand circled the net and scored on a rebound from the left side of the slot for his second goal.
Video: DET@BOS: Marchand slides home loose puck, ties game
Save of the game
After Xavier Ouellet's shot went wide the puck caromed to Darren Helm at the left hash mark, but Rask made the save with his right pad to keep the score tied with 33 seconds remaining in regulation.
Video: DET@BOS: Rask recovers for incredible pad stop in 3rd
Highlight of the game
David Krejci hit Pastrnak at the top of the left circle with a cross-ice pass for a one-timer that ended the game.
Video: DET@BOS: Pastrnak blasts one-timer for OT game-winner
Unsung performance of the game
Boston forward Jimmy Hayes, a healthy scratch the past seven games, screened Coreau on Miller's goal. Hayes had two shots on net, three hits and was plus-1 in 9:27 of ice time.
Video: DET@BOS: Miller roofs snap shot through Hayes' screen
They said it
"I think he's enjoying his time here every day and I think he understands that you have to appreciate what we have. We're pretty lucky being able to do what we love for a living, and I think at a young age he's understanding that. And yes, I think he was still upbeat and staying with it." -- Bruins center Patrice Bergeron on David Pastrnak handling his slump
"You got to give credit to Boston, they were just getting a lot of shots on net. I think they just generated a lot from innocent shots, but with some traffic, some bounces they generated some better chances." -- Detroit goaltender Jared Coreau
Need to know
The Red Wings were without forwards Thomas Vanek (lower body) and Dylan Larkin (upper body) because of injuries. ... Kevan Miller returned after missing four games with a concussion and defenseman Colin Miller returned after missing six games with a lower-body injury. ... Detroit forward Gustav Nyquist got the 100th assist of his NHL career on Green's goal.
Red Wings: Host the Toronto Maple Leafs on Wednesday (7 p.m. ET; SN, FS-D, NHL.TV)
Bruins: Host the Pittsburgh Penguins on Thursday (7 p.m. ET; TVA Sports, NESN, ROOT, NHL.TV)
Video: Pastrnak's OT winner leads Bruins past Red Wings