SUNRISE, Fla. — The Boston Bruins weren’t going to let playing against their former goalie Tim Thomas affect their game.

Thomas wasn’t so sure he could feel the same way.

Reilly Smith scored the winning goal with 59 seconds left in the third period and the Bruins beat the Florida Panthers 3-2 on Thursday night.

Smith backhanded the puck into the net between the legs of Thomas after a faceoff in the Panthers’ zone.

The goal spoiled Thomas’ first game against his former team since joining the Panthers as a free agent.

“I, of course, tried to approach it just like any other game,” Thomas said. “Having said that, it was a big game for me coming back after a while and then, obviously, facing your former team and a lot to-do around it. I was a little bit nervous today, but not too bad.”

Thomas fell to the ice in disappointment when Smith’s goal went in while the Bruins celebrated.

“Got close at the end there. We didn’t want that to happen,” Smith said. “It’s a great feeling to score and help the team get a win.”

Dougie Hamilton and Daniel Paille also scored goals for the Bruins, who got 27 saves from Tuukka Rask.

Jesse Winchester and Kris Versteeg scored for the Panthers and Thomas stopped 37 shots.

Thomas overcame a shaky first period to turn in a solid game until giving up the goal in the final minute.

“It hurts the way it ended up,” Thomas said. “I really wanted the guys in front of me to be rewarded after coming back in the third period after the way we started out.”

The 39-year-old Thomas, who spent his first eight NHL seasons with Boston, returned to the lineup after suffering a groin injury on Oct. 8 that forced him to an early exit after giving up two goals on five shots in a 2-1 loss at Philadelphia.

Thomas helped the Bruins win the Stanley Cup in 2011. The two-time Vezina Trophy winner also won the Conn Smythe Trophy that season as playoff MVP.

Thomas followed that by going 35-19-1 with a 2.36 goals-against average and five shutouts in 2011-12, then sat out the 2013 lockout-shortened season.

“It was an awesome time there (in Boston),” Thomas said. “I don’t know what else to say. This is a new chapter in my life; it’s a new chapter in the Bruins’ thing for them.”

Trailing 2-1, the Panthers tied it at 2 with six minutes left in the third on Winchester’s goal.

After the Panthers won a faceoff in the Bruins’ zone, Nick Bjugstad took a shot on goal. Rask blocked the shot, but lost control of the puck. It drifted in front of the crease and Winchester took a couple whacks at it before poking it in.

“I didn’t want to cost us the game,” Rask said. “I made a mistake there and they tied it up … the guys came up big after that.”

Florida closed to 2-1 in the second period after Versteeg took a pass from Jonathan Huberdeau in the right circle and wristed it past Rask at 12:32.

Boston went ahead 1-0 on Paille’s goal in the first. Paille skated in from the left circle and his wrist shot went high into the net at 3:45.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.