BOSTON – Tim Thomas drifted to the front of the crease to cut down the angle, leaving him out of position when the shot went wide to his right, off the boards and right to Lightning forward Steve Downie.

The Boston goalie reached back, swung his stick at the puck and caught it with the bottom edge of his blade, knocking it away to protect a one-goal lead and give the Bruins a 3-1 victory over Tampa Bay that left them one win away from their first Stanley Cup finals since 1990.

“It was just reaction and, you know, desperation,” Thomas said after stopping 33 shots Monday night — none bigger than Downie’s with about 11 minutes left. “I’ll admit I got a little bit lucky there.”

Thomas bounced back from a Game 4 collapse, and Brad Marchand scored the winner to help give Boston a 3-2 lead in the best-of-seven Eastern Conference finals.

The Bruins could clinch the series Wednesday night in Tampa Bay.

“Our goal right now is to not play a Game 7,” Bruins Coach Claude Julien said. “It’s going to take our best game.”

The Lightning would need to win Game 6 to force a decisive game in Boston on Friday. Tampa Bay faces elimination for the fourth time these playoffs, having fallen behind the Penguins 3-1 in the first round.

“Our backs were against the wall before against Pittsburgh,” forward Ryan Malone said. “We’re not going to be able to win two games in one game. So you try to go out there, worry about the first five minutes of the game and you take it from there.”

Simon Gagne, who scored the winner for Tampa Bay in Game 4, scored just 69 seconds in. Nathan Horton tied it for Boston in the second period, 17 seconds after returning from the penalty box. Marchand scored with 4:04 left in the period to give Boston a 2-1 lead.

Tampa Bay finally managed to pull the goalie with 42 seconds left, but Rich Peverley scored an empty-netter with 12.1 seconds left to clinch it. The Lightning left the extra skater on the bench for the ensuing faceoff, but they couldn’t come through with anything more than some shoving after the final whistle.

Boston managed just 19 shots on Mike Smith as he made his first career playoff start in place of Dwayne Roloson. Smith said he didn’t expect to play.

“I figured that Rollie would be back in,” he said. “He’s done well the whole playoffs. I was ready to go if called upon. Rollie’s been great, he’s been here and done this and any advice that he gives me is stuff that I just suck in like a sponge. Obviously he’s a great mentor.”

Thomas bounced back after allowing four straight goals in Game 4 and may have saved the season when he stopped Downie on the edge of the crease. The crowd cheered each time it was shown from a different angle on the scoreboard, and Thomas could even be seen smiling through his mask when the camera cut to him.

“That’s just a confident swagger. He definitely has that,” Bruins forward Chris Kelly said. “It’s a game. You’ve got to have fun with it. It’s a great opportunity for all of us. If you’re not going to enjoy it, you might regret it.”

Two nights after Tampa Bay rallied with five goals in a row to overcome a 3-0 deficit and win Game 4, Boston shrugged off Gagne’s goal and staged a comeback of its own.

After Gagne converted a two-on-one with Steve Stamkos to beat defenseman Johnny Boychuk and put the puck past Thomas, Horton tied it on a one-timer from Milan Lucic 4:24 into the second period — just Boston’s seventh shot.

Marchand also took a penalty in the second and then came back to score. After Zdeno Chara kept the puck in the zone, Patrice Bergeron went to the faceoff circle to retrieve it, then passed it over to Marchand for an easy chip-in past Smith.