SUNRISE, Fla. -- The Florida Panthers snapped their long losing streak Tuesday, and they did it the hard way.
Facing an Anaheim Ducks team that led the NHL with 31 points and had the longest active winning streak in the League at five games, the Panthers fell behind 2-0 in the first period before winning 3-2 at BB&T Center.
Brad Boyes snapped a 2-2 tie at 4:29 of the third period with his team-leading sixth goal of the season. He scored on a rebound in front of the net after Ducks goalie Frederik Andersen made a pad save on Scottie Upshall's shot from close range.
"Good teams don't lose 10 in a row, right?" said Upshall, who had a goal and the assist on the game-winning goal. "We really just wanted to come out and work hard and be back in our building and play well. We've got a good group of guys in here. We all know that. We just had a rough start to the season. Hopefully, [we] use this as a confidence builder."
Florida hadn't won since Oct. 19 when it defeated the Minnesota Wild 2-1 in a shootout.
Shawn Matthias also scored for the Panthers, who gave interim coach Peter Horachek his first victory. Horachek replaced Kevin Dineen on Friday.
"This is not about me," Horachek said. "This is about the team. The team's got to learn to win and be winners and learn how it feels. They feel pretty good in there right now. They know that they worked hard and they got back into the situation, won a big game and needed to win a game after where this team has been."
Tim Thomas, making his third consecutive start after being sidelined with a lower-body injury, made 32 saves.
Thomas stopped all 24 shots he faced in the last two periods and made a spectacular leg save on a redirect by Emerson Etem with about two minutes left.
"First and foremost, great save by him," Etem said. "He's a great goaltender, known to make those big saves. In those tight situations we need guys stepping up to the plate and maybe on a better day we bury those."
Andrew Cogliano and Hampus Lindholm scored for the Ducks (15-4-1), who failed to establish the best 20-game start in franchise history. Last season's team started 15-3-2.
Andersen stopped 22 shots but lost for the first time, two nights after becoming the first NHL goalie since 1993 to win his first six career decisions. Andersen was 6-0-0 with a 1.41 GAA and a .952 save percentage.
"We come here to Florida and they haven't had much success, but we took it for granted we were going to beat them and it caught up with us in the second period," Andersen said. "Pretty simple."
Anaheim played without leading scorer Ryan Getzlaf, who missed a second consecutive game because of an upper-body injury.
But the Ducks appeared in total control after taking a 2-0 lead into the first intermission. And it would have been 3-0 had Thomas not stopped Corey Perry, who came in with three goals and five assists in his previous five games, late in the period.
All it took was 70 seconds in the second half of the second period for the Panthers to tie the game.
Matthias got Florida on the board at 13:28 when he took a pass from Brian Campbell in the slot and fired a quick backhand through Andersen's legs. Upshall scored a fluky goal at 14:38 when his quick wrist shot from the point bounced off the stick of Ducks center Mathieu Perreault then off the shoulder of Lindholm before going over the shoulder of Andersen.
"I came in after the first period and told them I didn't like the way we were playing at all and if we don't get back to the way we can play, we're going to be in trouble," Ducks coach Bruce Boudreau said. "I hate being a prophet, believe me. You could see it happening. At 2-0, they were still close enough that if they got one … when a team is down, they start to feel it, they can be a tough team to beat, whether it's fluky goals or whatever. We dug our own hole today."
Cogliano gave Anaheim a 1-0 lead 40 seconds in by scoring in a fourth consecutive game. He took a nice centering pass from Daniel Winnik and got Thomas to go down with a quick deke to his forehand before he flipped the puck over the goalie.
Anaheim was 10-1-1 when scoring first.
Lindholm made it 2-0 at 14:26 of the first period with a wrist shot from the top of the left circle that beat Thomas high to the glove side.
The Ducks had won five of the past six meetings, including three by shutout. The teams will meet again March 23 at Honda Center.
"It was a resilient effort," Upshall said. "We didn't have a great start. That's been an issue. But when you've got a guy like Timmy in net, you're never out of a game.
"Once we got the first goal, once Matty scored that big goal for us, it was a big momentum turner and we didn't let off the gas. They played a great game too. There were really some bounces both ways. It could have gone either way. It's nice to get that one, nice to get that off our back."