CHICAGO — Of course, it was Andrew Shaw. The pesky little forward always gets up when he's knocked down.

The three-overtime opener of the Stanley Cup finals came to a thrilling end at the stroke of midnight Wednesday because the tenacious Shaw is a whole lot more than his reputation for irritating opposing players.

Shaw skated in front of the goal at the right time, deflecting Dave Bolland's tip into the net for the winning score in the Chicago Blackhawks' 4-3 victory over the Boston Bruins in the fifth-longest game in the history of the Stanley Cup.

"We knew it wasn't going to be pretty at that point," Shaw said. "You could tell both teams were physically exhausted. We've preached it: Go to the net, you'll find a way to get a greasy goal. We did a heck of a job of it there in the third overtime."

Shaw was knocked down near the boards but got up as the puck came out to Michal Rozsival, who started the winning sequence with a shot from the right point into traffic. Bolland's tip then went off Shaw's right leg and past Tuukka Rask at 12:08 for his fifth goal of the playoffs.

And just like that, the longest finals game in five years was over. Shaw skated off to the side and pumped his arms furiously, then joined his teammates for a weary celebration.

"The bigger the stage, the bigger the challenge, he rises to the occasion," Blackhawks coach Joel Quenneville said. "He knows where the front of net is. Doesn't have to be pretty. He's a warrior. He's one of those guys that you appreciate he's on your side and he's relentless."

Milan Lucic had two goals and an assist for the Bruins, who had won five straight and nine of 10. Patrice Bergeron scored a power-play goal and David Krejci finished with two assists.

"Not disappointed in our effort," Bruins coach Claude Julien said. "There's certain things you're going to want to fix for next game. But as far as the game is concerned, it was a hard-fought game."

Rask made an astounding 59 saves in a finals marathon that passed Pittsburgh's 4-3 win over Detroit on June 2, 2008, when Petr Sykora scored at 9:57 of the third overtime.

Game 2 is Saturday night at the United Center.

"That's playoff hockey," Bruins center Rich Peverley said. "It's fun to watch, so we'll think about this until we get out of here and then shake it off and get ready for Saturday."

The Blackhawks won for the eighth time in nine games and improved to 10-1 at home in the playoffs.

Bolland and Johnny Oduya scored in the third period for Chicago, which never would have made it to the third overtime if not for an impressive performance by goaltender Corey Crawford. Brandon Saad had his first goal of the playoffs.

Crawford gave the Blackhawks a chance by standing his ground when the Bruins had repeated opportunities in the extra sessions.

Shawn Thornton and Daniel Paille skated in for a 2-on-1 in the first OT, and Crawford turned away Thornton on the doorstep. He denied Peverley and Tyler Seguin in rapid succession, and helped Chicago kill off two power plays when it was whistled twice for too many men on the ice.

Nathan Horton hit the post in the first extra session, and Zdeno Chara's slap shot deflected off Jaromir Jagr and then the inside of the right post at the very end of the second overtime.

"It's exhausting," said Crawford, who had 29 of his 51 saves in the overtimes. "I just try to tell myself to make the next save, and we're going to score on our next shot."

The action was so fast and furious that it took a toll on the players, with Horton skating off during a power play with an injury — likely a serious one to leave the ice during that pivotal moment.

The Blackhawks trailed 3-1 in the third period before they turned up the pressure on Rask, who stepped up when he faced a similar attack from Pittsburgh in the Eastern Conference finals. This time, he coughed up the lead, hurt by one unlucky carom.

First, Bolland converted a nice pass from Shaw for his first goal of the playoffs. Then Oduya's long slap shot went off the left skate of Boston defenseman Andrew Ference and into the net for the tying goal with 7:46 remaining in regulation.

Oduya's shot was going wide if it didn't hit Ference's skate.

"We were up two goals and all of a sudden the game was tied," said Bruins defenseman Zdeno Chara, who had more than 45 minutes of ice time. "We've got two days to regroup and get ready for the next game."

The sellout crowd of 22,110 cheered as Krejci and Chicago captain Jonathan Toews stared each other down for the opening faceoff of the first Stanley Cup finals between Original Six franchises in 34 years.

And it almost didn't happen.

Game 1 came exactly five months after the official end of a long and bitter lockout. The labor dispute wiped out 510 games, but the sides managed to come together in time to save an abbreviated 48-game season and playoffs.

They were rewarded with a final playoff series between two big-market teams with passionate followings and scores of top players. Led by Toews and a group of skilled forwards, the Blackhawks returned to the Stanley Cup finals for the first time since they won it all three year ago. Boston won the title the following season, and the same core of players is at the center of this year's playoff run.

It was enough to attract the attention of President Barack Obama, who has a home in Chicago and made it clear who he was pulling for before the opener. He wished the Blackhawks good luck over Twitter before adding: "hope to welcome you back to the White House again as #StanleyCup champs."

Boston countered with a Rolling Stone: Mick Jagger tweeted a picture of himself holding a Bruins jersey before a show at TD Garden.

The Bruins got off to fast start behind Lucic, who converted a nice pass from Horton for the first goal of the series at 13:11 in the first.

Lucic set up his second goal with a little dirty work. He won the puck in a scrum along the boards, got a pass from Krejci and fired it into the right side just 51 seconds into the second period, extending Boston's lead to 2-0 with his fifth goal of the playoffs.

The two-goal lead looked like a sure bet with Rask in net, but the Blackhawks found a way to get back into the game against the red-hot goaltender. Marian Hossa stole the puck from Dennis Seidenberg in the Boston end and fed Saad, who one-timed it past Rask at 3:08 in the second.

Saad's goal ended a scoreless streak of 149 minutes and 36 seconds for Rask dating to Game 3 of the sweep against the Penguins.

That got the crowd going again, and the Blackhawks drew a pair of penalties in rapid succession to earn a 5-on-3 power play for 1:17. With the prime opportunity to move into a tie, they passed the puck around too much and the Bruins easily killed off both penalties.

NOTES: It was the first game between the teams since Boston's 3-2 shootout victory on Oct. 15, 2011. There were no games against teams from the other conference during the lockout-shortened season. ... This is the first playoff series between the teams since Boston swept Chicago in the 1978 quarterfinals. The Bruins won five of their six previous postseason series against the Blackhawks.