RALEIGH, N.C. -- James Van Riemsdyk had a goal and an assist to help the Toronto Maple Leafs beat the Carolina Hurricanes 5-4 on Friday night.

Van Riemsdyk was one of four goal scorers in the second period for the Maple Leafs (15-8-1), who won for the seventh time in nine games.

The Hurricanes (9-8-4) lost their second straight home game. It wasn't for a lack of effort early or late.

Coming off of a lacklustre 6-1 home loss to the New York Rangers on Wednesday night, Carolina scored three goals in the third period and had a 47-25 advantage on shots. Noah Hanifin's goal with 4:11 to go cut Toronto's lead to one, but Frederik Andersen, who made 43 saves, held off a late Carolina flurry.

The Hurricanes opened the game in control with 14 shots to four for Toronto in the opening period. Andersen was solid, then the Maple Leafs' offence picked up in the second period.

Zach Hyman scored 52 seconds into the period and fourth-line winger Josh Leivo added his first goal of the season at 7:14.

Van Riemsdyk, playing against his younger brother Trevor, a defenceman for the Hurricanes, then set up former Canes defenceman Ron Hainsey for a 3-0 lead.

Andersen stopped the first 22 shots, but Carolina centre Derek Ryan beat him from the front of the net at 13:35 of the second period. But Van Riemsdyk made it 4-1 with a shot that bounced off the post and then the skate of goalie Cam Ward.

Jordan Staal gave the Hurricanes life just over three minutes into the third period. Patrick Marleau answered about two minutes later to push the Leafs' lead to 5-2.

NOTES: Hainsey scored in his first game back at PNC Arena. The veteran defenceman played parts of four seasons for the Hurricanes from 2013 through '17. He was traded at the deadline last season to Pittsburgh and helped the Penguins win the Stanley Cup. He signed a free-agent deal with Toronto in the off-season. . Center Victor Rask had been a healthy scratch the previous two games but was back in the Carolina lineup. He had four shots and was used on the top power play. . Ward started in goal for only the second time in seven games, but was pulled in the third period for regular starter Scott Darling. Ward allowed Toronto to score on four of its first 14 shots.

UP NEXT

Maple Leafs: Host Washington Capitals on Saturday for their third game in four days.

Hurricanes: Host Nashville Predators on Sunday to close out four-game homestand.