SAN JOSE, Calif. (AP)Moritz Seider scored the tiebreaking goal with 6:06 to play and the Detroit Red Wings overcame a four-point game from Erik Karlsson to beat the San Jose Sharks 7-4 on Thursday night.

Karlsson rallied San Jose back from a 4-2 deficit in the third period with his third assist and then the tying goal in a span of less than three minutes.

But then Seider answered 2:23 later when he took a pass from David Perron and beat James Reimer for his first goal of the season.

”It was just a big goal for us at the time and obviously for him, too,” coach Derek Lalonde said. ”It was a huge gut punch giving up that two-goal lead. But our guys hung in there and made a play and we found ourselves up.”

Pius Suter added an insurance goal and Dominik Kubalik scored an empty-netter to help the Red Wings snap a four-game losing streak.

Perron finished with a goal and two assists. Jake Walman, Filip Hronek and Joe Veleno also scored for Detroit. Ville Husso made 20 saves.

”We almost buckled, but we didn’t,” Perron said. ”We stayed strong and that was great. A good two points.”

Kevin Labanc, Matt Nieto and Logan Couture scored for the Sharks, who have just one win in 10 home games this season. Reimer made 14 saves.

”I thought we had a chance to get some points,” Reimer said. ”Unfortunately, we couldn’t get it done. I don’t have to wait for the question – I know I wasn’t good enough tonight.”

Detroit controlled play in the second period and wore down the Sharks with long shifts in the offensive zone, taking a 3-2 lead on goals from Perron and Walman.

”I’m really proud of the guys. Got thoroughly outplayed, outcompeted in the first period,” Lalonde said. ”I challenged the guys a little bit and we really flipped that second period. We started winning those battles, flipped the game, took the lead.”

The Sharks fell behind 4-2 in the third before tying it when Karlsson’s shot deflected off a Detroit defender and past Husso.

Karlsson is off to a sizzling start with nine multipoint games in 19 contests this season. He has 11 goals and 17 assists overall, with his 28 points tied for the second-most for a defenseman in his team’s first 19 games since the 1989-90 season.

Karlsson set up the first goal when he caught a pass, dropped the puck and sent a backward pass between his legs to Labanc, who scored on a one-timer.

”He’s feeling himself,” Labanc said. ”He’s got that skill where the puck just doesn’t seem to leave his stick.”

After Hronek tied the game, Karlsson sprung Nieto with a long pass and he skated through four defenders before beating Husso with a backhand to make it 2-1.

BOUGHNER’S RETURN

Former Sharks coach Bob Boughner returned to San Jose for the first time since being fired after last season. He had a 67-85-23 record for the Sharks from 2019-22. Boughner, now an associate coach for Detroit, was acknowledged on the video board in the second period.

UP NEXT

Red Wings: At the Columbus Blue Jackets on Saturday night.

Sharks: Host the New York Rankers on Saturday night.

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