BOSTON — The Boston Bruins’ stunning run against the mighty Pittsburgh Penguins is complete.

Adam McQuaid scored the lone goal 5:01 into the third period and Tuukka Rask turned in another stellar effort, stopping 26 shots for his second shutout of the series as the Bruins beat the top-seeded Penguins 1-0 on Friday night to complete a four-game sweep of the Eastern Conference finals.

Boston will be playing for its second Stanley Cup championship in two years against either Chicago or defending-champion Los Angeles.

The game ended with a flurry of Penguins shots at Rask, who frustrated Pittsburgh throughout. He grabbed the last one at the horn with his glove and batted it into the air with his stick after it was over.

“That last shot I saw at the last second and I saved it,” he said before breaking into a smile. “I realized it was over — relief.”

With the building rocking, bodies flying and the Penguins’ hopes fading, the Bruins — and mainly Rask — did what they did nearly the entire series — kept the puck out of the net.

“It was just pure desperation,” Boston winger Chris Kelly said. “Guys were just willing to sacrifice anything. You see Z (Zdeno Chara) on the ice. Jags (Jaromir Jagr) is on the ice trying to block shots. Everyone’s doing whatever it takes to not let that puck cross the line.”

It was a symbol of what the Bruins are this series.

“I think we took that approach of trying to be a desperate team,” Kelly said. “We know how good they are and how many offensive tools they have.”

Boston dominated the Penguins, outscoring them 12-2 in the series and holding down a team that averaged more than four goals per game through the opening two rounds.

“I didn’t expect to go out four straight,” said Penguins captain Sidney Crosby, who was held pointless in the sweep. “But the last couple of games, I thought we deserved better. Unfortunately, we didn’t find a way to regroup after dropping those two at home.”

Boston won the opening two games in Pittsburgh, 3-0 and 6-1, before pulling out a 2-1 double-overtime thriller on Wednesday night at TD Garden.

“This series here against Pittsburgh was not a four-nothing series,” Boston coach Claude Julien said. “The breaks went our way. … I think Pittsburgh was a little snake-bit that way. But that’s not saying we didn’t play well. When you hold a team like Pittsburgh to two goals, that’s a good series.”

On the winning goal, Brad Marchand made a perfect drop pass to McQuaid, who unloaded a shot from the point that tipped off Pittsburgh winger Jarome Iginla and sailed over the glove of goalie Tomas Vokoun.

About a minute after McQuaid’s goal, the crowd broke into brief chants of: ‘We want the Cup!’ The same cheer was heard ringing through TD Garden during Boston’s run to the 2011 title.

“To sweep a team like Pittsburgh, the highest scoring team in league, is not easy to do,” Bruins center David Krejci said. “We played good defensively and no one was cheating on the ice.”

The Bruins nearly increased their lead with just under eight minutes to play when Jagr clanged a shot off the crossbar on the power play. Less than two minutes later, Daniel Paille had a clean breakaway but missed wide left.

But that was all Boston needed with the red-hot Rask and a team that relied on tough defense.

The Bruins found a way to shut down the game’s most potent offense.

“There’s no question that the performance (Rask) put in this series was elite,” Penguins coach Dan Bylsma said. “He was the difference in the series. It’s not like we didn’t have good scoring opportunities and good scoring chances.”

The Penguins now have a summer to think about what happened.

“Our team is a team that considered itself capable of winning a Stanley Cup, and those were the expectations.” Bylsma said. “Coming up short is disappointing. No question we’ll look at this as a missed opportunity.”

Iginla, who vetoed a proposed trade-deadline deal to Boston because he wanted a chance to win the Cup with Sidney Crosby and company, will now have to live with a summer of what ifs.

What if he came to Boston? What if he left McQuaid’s shot alone?

Boston nearly broke the scoreless tie early in the second period when winger Kaspars Daugavins took a pass from linemate Rich Peverley in the left circle, cut in front and had Vokoun beaten, but he slipped a wrist shot off the left post.

After the Bruins killed off Marchand’s interference penalty midway into the period, the Bruins had a power play when Brenden Morrow tripped Marchand.

Boston had two decent chances, but its best came about a minute after the power play when Tyler Seguin was robbed by Vokoun’s glove stop at the end of a two-on-one break.

For about six minutes, play was nearly non-stop with each team getting a few decent scoring chances. Pittsburgh’s best was when Rask made a right pad stop on Crosby’s shot from the bottom of the left circle.

The Penguins had one final good chance late in the period when defenseman Paul Martin had an open lane on a shot from the right point, but Rask dropped to make a pad save.

And the teams entered the third like they did the second — tied 0-0.

NOTES: The Bruins had the parents of Krystle Campbell, who died after injuries suffered during the Boston Marathon bombings, as the banner captains on the ice before the game. … Krejci entered the game leading the playoffs in points (21 goals, nine assists). … Tyler Kennedy, a healthy scratch for the last two games, was back in the lineup and C Joe Vitale was scratched. … Daugavins took Campbell’s spot in the lineup and on the fourth line. … The Penguins’ notes had an interesting highlight of an item called ‘Past Precedent,’ mentioning the last team to hold a 3-0 lead and not advance — the 2010 Bruins against the Philadelphia Flyers. … Red Sox DH David Ortiz was in a luxury box waving a yellow towel. Boston’s game against the Angels was rained out earlier in the day.

NHL NOTEBOOK: Boston Bruins’ forward Gregory Campbell is out for the season with a broken leg suffered in Wednesday’s game against the Pittsburgh Penguins, general manager Peter Chiarelli said Thursday. Despite a broken right fibula, Campbell remained on the ice for 50 seconds attempting to kill a penalty. “For what he went through, he showed a lot of guts to stay out there and to still try and play,” head coach Claude Julien told reporters after Wednesday’s game. “Obviously, it was a pretty serious injury. So that’s just the kind of player he is, and it doesn’t surprise me. It doesn’t surprise his teammates, but certainly it shows the character of that player, and that’s why we appreciate having him on our team.” Campbell had three goals and four assists in 15 playoff games while serving as a penalty killer.