DALLAS (AP)Tomas Hertl scored early in the third period to help San Jose build a big lead, and the Sharks held on to beat the Dallas Stars 5-4 on Friday night to snap a five-game losing streak.

Alexander Barabanov, Logan Couture, Timo Meier and Hertl each had a goal and an assist, and Evgeny Svechnikov also scored to help the Sharks get their first win since Oct. 27 and only their fourth in 16 games. James Reimer had 25 saves to end a personal four-game losing streak.

Couture also had a fighting penalty, giving him a Gordie Howe hat trick.

Jamie Benn scored twice in the first period and Roope Hintz and Joe Pavelski also scored for the Stars. Jason Robertson had two assists.

Jake Oettinger gave up all five goals on 18 shots after coming in leading the NHL in goals-against average (1.40) and save percentage (.952). He allowed more than two goals for the first time this season in his return after missing four games with a lower body injury.

The Sharks broke a 2-2 tie with two goals in the first 65 seconds of the second period.

Meier whistled a wrist shot off the far post only 29 seconds in, extending his goal-scoring streak to five games. Just 36 seconds later, Couture scored from just inside the right circle to make it 4-2.

The Sharks scored at the 29-second mark again in the third period when Hertl corralled a rolling puck near the crease and netted a backhander for a three-goal lead.

Hintz hit from the right dot 6:18 into the third to pull Dallas back within two goals, and Pavelski’s rebound goal while falling forward made it 5-4 at 12:06.

Benn started and ended the scoring in the first period. He skated in from center-ice on a 2-on-1, kept possession and wristed from the left circle under Reimer’s glove for the game’s first goal at 4:42.

The Sharks tied it on Barabanov’s first goal of the season 10 seconds into a power play at 6:13.

Svechnikov, who didn’t dress in the previous three games, gave San Jose a 2-1 lead with 7:42 remaining when he beat Oettinger stick side after Dallas committed a neutral-ice turnover.

Benn tied the score 2-2 with 20.4 seconds left, going top shelf over the glove again.

UP NEXT

Sharks: At Minnesota on Sunday night in the third of a four-game trip.

Stars: At Philadelphia on Sunday to open a three-game trip.

AP NHL: https://apnews.com/hub/nhl and https://twitter.com/AP-Sports