OTTAWA — For the third time this season, Ottawa Senators winger Bobby Ryan scored the deciding goal in a victory over the Boston Bruins.

But none of them were bigger than his 18th of the season to give Ottawa a 6-4 victory over the Bruins at Canadian Tire Centre on Thursday night.

The win was the fifth in a row for the Senators, and it moved them to with two points of the Bruins in the race for the second wild card spot in the Eastern Conference.

With 8:32 left in the third, Ryan broke a 4-4 tie when he fired a puck from the right-wing face-off circle that was stopped by Bruins goalie Tuukka Rask, but the rebound bounced in off Bruins defenseman Zdeno Chara.

Center Kyle Turris sealed the win with an empty-net goal.

Senators goalie Andrew Hammond fell short of breaking a record he shares with Hall of Fame Bruins goalie Frank Brimsek for allowing two or fewer goals in the first 12 games of his career. Hammond, who had skate issues during the warmup and had to run down the tunnel from the dressing room in order to get to his crease in time for the opening face-off, gave up two goals on the first four shots he faced.

In a tribute to Hammond’s nickname, the first 10,000 fans through the doors were given Hamburglar masks to wear. He wounded up making 31 saves on the night to improve his record to 12-0-1.

Rask, who missed the Bruins last start because of “general soreness”, made 26 saves.

Other Senators goals were scored by centers Kyle Turris, David Legwand and Jean-Gabriel Pageau and winger Milan Michalek.

The Bruins were led by center Ryan Spooner, who scored twice against his hometown team for the second time in nine days. Center Carl Soderburg and defenseman Torey Krug had the other Boston goals.

The lead went back and forth through 40 minutes as the teams entered the third tied 4-4.

Turris opened the scoring 19 seconds into the game by jumping on a rebound and swooping around Rask. But Soderberg tied the count at the 59 second mark with a wrist shot from just inside the blue line that deflected off a Senator, and then Spooner put the Bruins ahead at 4:04 by deflecting a shot by winger Milan Lucic.

Michalek sent the teams to the dressing room for the first intermission tied 2-2 when he snapped home his 13th of the season at the 15:03 mark.

Legwand gave the Senators the lead 3:11 into the second after taking a pass originating from behind the net by winger Erik Condra. But the Bruins pulled even again when the Senators ran into penalty troubles and were left two men short for 1:21.

Spooner snapped home his second on the power play at 11:42, but Pageau deked around Rask to score a short-handed marker 17 seconds later.

Krug knotted things once again with a backhand from the side of the net at 13:17 of the second.

Referee Francis Charron was left to handle most of the duties by himself when referee Kelly Sutherland went down with an injury early in the second period.