BOSTON — The surging Boston Bruins said they weren’t fazed by Sidney Crosby’s last-second goal. They proved it in overtime.

Torey Krug scored 34 seconds into OT and the Bruins beat Pittsburgh 4-3 on Monday night, snapping a seven-game, regular-season losing streak to the Penguins in a matchup of the Eastern Conference’s top two teams.

Pittsburgh captain Crosby had scored with 0.3 seconds left in regulation to tie it.

But the Bruins responded quickly. Playing with three forwards and one defenseman, they want right at the Penguins.

“We were OK,” Boston Coach Claude Julien said of the late goal. “For some teams, sometimes it can be demoralizing. But I think this may have made us more hungry to go and try to win it.”

Krug won it with a slap shot from the left circle that beat goalie Marc-Andre Fleury past his left arm.

Loui Eriksson and Reilly Smith scored first-period goals, and Zdeno Chara made it 3-2 with 5:15 left in regulation for the conference-leading Bruins, who are 8-2-1 in their last 11 games. Tuukka Rask made 28 saves for Boston, which beat the Penguins for the first time since December 2011.

Boston also improved to 7-0-2 in its last nine home games, with both losses coming in shootouts.

“It’s tough,” Krug said of the tying goal, “but we’ve got the guys and leadership where we’re not going to get down.”

Pittsburgh salvaged a point after pulling Fleury for an extra skater. Chris Kunitz fired a desperation backhander on net, and Crosby – at the edge of the crease – deflected the puck across the goal line behind Rask just as the green light went on.

A video review clearly showed that the puck went in before time ran out.

“Just hanging around the crease, hoping the puck would end there,” Crosby said.

Rask said it didn’t distract him or his teammates for very long.

“You’re always kind of mad about that, but we didn’t let it bother us,” he said. “We went out in overtime and took the puck to their zone and then scored a goal. I think that’s the sign of a good team, that you don’t get down on yourself after a goal like that.”

James Neal scored the first two goals for Pittsburgh, and Fleury made 20 saves.

The Penguins lost for the sixth time in 10 games. It was also the first meeting in Boston since the Bruins swept the Penguins in last season’s conference finals.