Ryan O'Reilly tied the game with 1:45 left in regulation, and Nathan MacKinnon had the only goal in the shootout as the Colorado Avalanche rallied to beat the Boston Bruins 3-2 on Wednesday night.

Jarome Iginla also scored for Colorado, and Semyon Varlamov stopped all three Boston shots in the tiebreaker.

Torey Krug and Brad Marchand had Bruins goals in regulation in the final game for both teams before the NHL All-Star break.

Trailing 2-1, Colorado, which went 0-6 on the power play, pulled Varlamov for an extra attacker with just over two minutes remaining. In a scramble in front of the net, O'Reilly lifted a backhanded shot over sprawled goalie Tuukka Rask to tie it.

Boston got even 1-1 on Krug's goal at 6:18 of the second. The game remained deadlocked into the third as Colorado failed to capitalize on four successive power plays, including two stretches for just over a minute with a two-man advantage.

Boston's penalty-killing unit, along with Rask withstood a volley of shots to fend off Colorado's advantages.

After shutting down another Avalanche power play early in the third period, Boston went in front 2-1 when Marchand put a wrist shot from the left circle into the corner of the net.

Alex Tanguay set up Iginla with a shot from the left side that Rask stopped but couldn't control. The rebound knuckled through the slot where Iginla picked it up and flicked it into the net an instant before the horn sounded ending the first period.

NOTES: Iginla's goal was the 574th of his career, snapping a tie with Mike Bossy for 20th on the NHL career list. ... The Avalanche will have four days off during the break before reconvening Monday for practice ahead of Tuesday's game at Nashville. ... The Bruins resume play next Thursday when they visit the New York Islanders. ... Boston is the only team that hasn't allowed a short-handed goal this season. ... The Bruins have allowed the first goal 26 times this season.