DETROIT -- David Krejci and Reilly Smith scored in the shootout to give the Bruins a 3-2 win against the Detroit Red Wings at Joe Louis Arena on Wednesday.
It ended Boston's three-game losing streak.
"It's huge," Smith said. "It's tough. You try not to think about it. But it's always in the back of your mind."
Krejci and Smith scored for Boston in regulation. Tuukka Rask made 18 saves and stopped two shootout attempts.
"A real tough win. But a win we deserved," Bruins coach Claude Julien said. "… Probably the best game we've played to this point."
Detroit goalie Jimmy Howard gave his team a chance with 37 saves. Gustav Nyquist scored a power-play goal 2:56 into the third period to tie it 2-2.
"[Howard] was phenomenal. He was the one that kept us in the game and saved a point for us there," Nyquist said. " … And all the way throughout the game he was our best player, I thought."
Tomas Tatar scored for Detroit, which has started 1-1-1.
The Bruins controlled play for most of overtime and Howard was forced to make four saves. He also stopped Dougie Hamilton and Smith from in close in the last minute of regulation.
"Jimmy played a great game and kept them in it," Rask said.
Boston's Daniel Paille hit the post with 8:57 left in the third period.
Nyquist beat Rask with a wrist shot from the top of the right circle high on the stick (long) side. It was Nyquist's third goal this season and came with Boston defenseman Adam McQuaid in the penalty box for interference.
"The first three games when they scored we were getting down and deflated," Bruins forward Milan Lucic said. "… Here today, we didn't let anything bother us. It didn't matter that they tied it up on a bad call. We just went out there and gave ourselves the best chance to win."
Smith gave the Bruins a 2-1 lead with 6:29 left in the second period when he put in a rebound from the front of the net. It was Smith's second goal.
"Funny, that's exactly what we were doing in practice the last couple of days: Getting a dirty goal," Smith said.
Rask stopped Red Wings center Luke Glendening on a breakaway off the right wing 5:01 into the second period. Howard made a glove save on Boston center Patrice Bergeron's one-timer from the bottom of the right circle at 6:33 of the period.
The game was tied 1-1 in the first period, despite Boston dominating in shots on goal by a 14-4 margin.
"We came out ready and really skated hard and made some sweet passes," Rask said.
Krejci opened the scoring 5:12 into the game when he raced around Red Wings defenseman Jakub Kindl for a breakaway and beat Howard with a forehand shot glove side, after a couple of moves. The play was caused when Detroit center Darren Helm lost the puck outside the Boston blue line.
It was the first goal of the season for Krejci, who was playing in his second game after missing the first three with a shoulder injury.
Tatar tied the game 1-1, 3:28 later when he picked up a loose puck at the bottom of the right circle and snapped a shot past Rask under the crossbar on the long side. It was Tatar's first goal this season.
An errant puck hit Bruins assistant coach Doug Houda, who played with the Red Wings during his NHL career, in the head 6:39 into the second period. He was cut and bleeding, but got stitched up and returned to the bench with a little less than 10 minutes left in the period.
Bruins forward Simon Gagne played 12:13 in his first NHL game since April 27, 2013.
Boston travels to play the Montreal Canadiens in their home opener at Bell Centre on Thursday.
"It was good to get that win," Lucic said. "We just have to keep it going."