Alex Nedeljkovic became the first goalie in NHL history to have a goal and an assist, and made 40 saves as the Pittsburgh Penguins beat the Buffalo Sabres 5-2 on Friday night.

Rickard Rakell, Anthony Beauvillier, Cody Glass, and Bryan Rust also scored for Pittsburgh who ended a three-game losing streak.

Owen Power and Zach Benson scored for Buffalo and Ukko-Pekka Luukkonen made 14 saves. The Sabres lost for the 18th time in 24 games (6-14-4).

Nedeljkovic had a secondary assist on Glass’ goal with 8:17 left in the second period that gave the Penguins a 3-1 lead. He then scored — the 16th NHL goalie to do so —when he sent the puck from behind the net down the ice and into an empty net with 2:42 left in the third.

Hurricanes 3, Golden Knights 2 >> Seth Jarvis scored twice to help Carolina beat Vegas.

Jackson Blake also scored for the Hurricanes, who scored three straight goals after falling behind 1-0.

Pyotr Kochetkov withstood a steady stream of first-period shots before finishing with 29 saves for Carolina, including a stop on Keegan Kolesar’s penalty shot midway through the second that denied Vegas a 2-0 lead.

Tomas Hertl scored early in the second to give the Golden Knights a 1-0 lead, and Shea Theodore added a power-play goal to make 3-2 midway through the third.

Vegas has now lost four of five games.