If there was a perfect time for Bruins goalie Tuukka Rask to preserve a three-goal lead with a shutout, yesterday was it.

The last time Rask was in net, he gave up four goals in a row to the Washington Capitals as the Bruins blew a 3-0 lead on Tuesday. The last time he faced the Flyers, on May 19, 2010, he also gave up four goals in a row as Philadelphia came back from a 3-0 deficit to beat the Bruins in Game 7 of the Eastern Conference quarterfinals.

And the scene was set yesterday in the Garden after the Bruins scored three times in the first period. But this time Rask persevered stopping all 23 shots to earn his 13th career shutout.

After the game, Rask didn’t play up the matchup with the Flyers.

“I mean it’s in the past. As I’ve said before, we won the whole thing the year after,” Rask said. “Things happen in hockey. For a goalie, if you start thinking that certain matchups are better for you than the others than you’ve lost half the battle. It was just a game like any other.”

But the timing of Rask and the defense’ performance was impeccable. The last two times he was in net, against the Capitals and Montreal Canadiens, he gave up eight goals in losing efforts. Yesterday, Bruins coach Claude Julien said the team’s defensive performance was one of the best of the season.