RALEIGH -- Derek Ryan scored the go-ahead goal at 9:35 of the third period and the Carolina Hurricanes beat the Florida Panthers 3-1 on Tuesday night to snap a four-game losing streak.

Brock McGinn also scored, Justin Williams added an empty-netter and rookie Roland McKeown had his first two assists for the Hurricanes, who went 1-4-2 in their previous seven games while slipping into last place in the Metropolitan Division.

Vincent Trocheck scored for the Panthers, who are 0-3-2 in their last five games, and Roberto Luongo made 45 saves in his second game back from a hand injury.

Scott Darling stopped 30 shots for Carolina.

Ryan's go-ahead goal came off a draw, with Luongo deflecting Williams' long-range shot high. Ryan batted it out of the air and into the net for his third goal.

The Hurricanes entered with one of the NHL's worst offenses, ranking 30th in the league with 31 goals and 27th with a 2.58 scoring average.

Florida's defense hadn't been any better, giving up a league-worst 4.23 goals per game and allowing 20 of them in its last three _ with at least five goals surrendered in each, a reason why the Panthers entered tied with Buffalo with an Eastern Conference-worst 10 points.

For much of this one, Luongo was the story.

After he spent the first 30-plus minutes stopping every puck the Hurricanes threw his way _ including several in spectacular fashion, and several against Jeff Skinner _ McGinn finally broke through with 7:43 left in the second, stuffing a rebound past the Florida goalie to make it 1-0.

This game was special for the McGinn family, the first NHL matchup between Carolina's McGinn and his big brother Jamie, a veteran winger for the Panthers _ and Jamie was on the ice for his younger brother's second goal of the season.

The Panthers tied it 1:49 later on their first power-play chance of the night, when Trocheck beat Darling with a wrist shot.

NOTES: Luongo played in his 972nd game, moving into sole possession of third place on the NHL's career list among goalies. Patrick Roy is next with 1,029. ... Trocheck has goals in three straight games. ... Luongo had the secondary assist on the Panthers' goal, his 21st career point. ... Carolina was without D Brett Pesce (concussion) for a third straight game.

UP NEXT

Panthers: Visit Buffalo on Friday night in a matchup of the two worst teams in the Atlantic Division.

Hurricanes: Visit Columbus on Friday night.