BOSTON -- Torey Krug tied it with 31.5 seconds remaining, David Pastrnak scored the deciding goal in the shootout, and Anton Khudobin made 29 saves through overtime to help the Boston Bruins to a 2-1 win against the Carolina Hurricanes at TD Garden on Thursday.
Ryan Spooner also scored in the shootout for the Bruins (13-10-1), who won for the second time in their past six games (2-3-1).
Khudobin made saves on two of three Hurricanes attempts in the shootout to earn his first win in four starts (1-3-0).
WATCH: All Hurricanes vs. Bruins highlights
"It feels awesome. Whenever you get the W, nothing can be better," said Khudobin, who has a 2.75 goals-against average and .902 save percentage.
Cam Ward made 34 saves through overtime, Noah Hanifin scored his second goal of the season, and Jaccob Slavin scored in the shootout for the Hurricanes (9-9-5).
Carolina, which is 0-2-0 on a three-game road trip and has lost four straight away from PNC Arena, failed to hang on to a 1-0 lead late in the third period.
"Well, you've got to extend the lead, right?" coach Bill Peters said. "It's throughout the game. It's the chances you have early in the game, the breakaways in the game, a breakaway in overtime, and there's opportunities to score. You've got to figure it out and make the play and got to make the big-time play and make a difference."
Krug tied it 1-1 with his second goal of the season, first in 10 games. The Bruins had been moving the puck around the Hurricanes zone with Khudobin pulled for the extra attacker.
"It wasn't our prettiest game, it wasn't necessarily a good game by our standards. But those are goals throughout the season you feel like you earned and you deserved," Krug said. "So we worked and we worked, and it didn't matter how long it took in the third. Ultimately, it would pay off, and it did."
A faceoff violation against Bruins forward Matt Beleskey at 6:33 of the second period gave the Hurricanes a power play, and Hanifin took advantage. After Jeff Skinner tracked a loose puck to the corner, he passed it to Hanifin at the left point. The defenseman's slap shot eluded several bodies and Khudobin's glove for a 1-0 lead at 7:37.
Goal of the game
Krug's tying goal was kicked in by Carolina forward Teuvo Teravainen after Ward made the initial save on the defenseman's one-timer from the blue line.
Video: CAR@BOS: Krug scores game-tying goal in final minute
Save of the game
Jeff Skinner had a breakaway as part of a 3-on-0 rush by the Hurricanes, but Khudobin made a stick save at 7:28 of the second period.
Video: CAR@BOS: Khudobin turns away Skinner on a breakaway
Highlight of the game
Pastrnak deked to his backhand before tucking a forehand shot behind Ward to give the Bruins a 2-1 lead in the shootout.
Video: CAR@BOS: Pastrnak dekes Ward, helps lift Bruins in SO
Unsung moment of the game
Bruins forward David Backes screened Ward and then battled Teravainen in front to help earn Krug the tying goal.
They said it
"We weren't strong enough. I think our team for two periods was content with being OK. But that wasn't good enough for us. We needed to step it up in the third period, and at least we did that." -- Bruins coach Claude Julien
"Our guy is playing hard in front of the net and kicks one in. Eventually stuff like that happens sometimes. You're not going to go too crazy over that. So it was a good game as a team. Again, when we've got the puck on our stick with a couple of really good chances to maybe bury it, that's something we have to make sure we're doing to get these wins." -- Hurricanes defenseman Ron Hainsey
Need to know
Hurricanes forward Elias Lindholm left the game because of an undisclosed injury with 8:33 remaining. ... Hanifin, a native of nearby Norwood, Massachusetts, who played at Boston College, has scored two of his six NHL goals against the Bruins. ... Boston is 1-8-1 when trailing entering the third period. … The Bruins are 7-0-3 in their past 10 games against the Hurricanes, whose last regulation win in the series came on April 13, 2013. ... Bruins defenseman Zdeno Chara missed his fifth game because of a lower-body injury, but he participated in the morning skate.
Hurricanes: At the New York Rangers on Saturday (1 p.m. ET; MSG, FS-CR, NHL.TV)
Bruins: At the Buffalo Sabres on Saturday (1 p.m. ET; SN, MSG-B, NESN, NHL.TV)
Video: Krug's late goal, Pastrnak's SO winner lift Bruins