SAN JOSE, Calif. (AP)Trevor Zegras and Troy Terry scored shootout goals and the Anaheim Ducks overcame Erik Karlsson’s first career hat trick to beat the San Jose Sharks 6-5 on Tuesday night.

Logan Couture scored for San Jose in the shootout but Anthony Stolarz stopped Karlsson and Kevin Labanc to earn his first win of the year.

”As a goalie, you can’t worry about the number of goals that you give up during the game,” Stolarz said. ”You’ve just got to focus on that next shot. Obviously tonight the guys did a great job putting the puck in the net and it was kind of just up to me to make that big save when I needed to.”

Stolarz finished with 39 saves to improve to 6-1 against the Sharks in his career.

”I just like this building,” he joked. ”You play enough games here, it becomes natural. It must be the lighting or something.”

Adam Henrique scored twice for Anaheim. Ryan Strome, Frank Vatrano and Max Comtois also scored as the Ducks won their first road game of the year, improving to 1-5-1.

”I think it was probably a very entertaining game for the fans and maybe not so much for both teams when it comes to the structure part of it,” Anaheim coach Dallas Eakins said.

Karlsson had three goals and an assist for San Jose. Timo Meier added two goals.

”The puck went in, which is all that matters,” Karlsson said. ”It’s nice (for the team) to score five goals, but at the same time we let in five as well.”

Kahkonen stopped 39 shots.

Henrique opened the scoring 5:16 into the first period with his first goal of the year. Karlsson answered with two goals in 23 seconds, the seventh-fastest mark by a single player in Sharks history.

”I think everybody is seeing what a world class player he is,” San Jose coach David Quinn praised. ”We’re talking about a two-time Norris Trophy winner and he’s only 32 years old. He’s got a lot of great hockey ahead of him and he’s certainly playing like a Norris Trophy winner now.”

Vatrano tied it later in the first and Henrique put Anaheim back ahead with 15 seconds left in the period. Meier responded with a power play goal early in the second to tie the game at 3.

Strome gave the Ducks the lead later in the period, but Meier was credited with the tying goal just 21 seconds later when Anaheim’s Jakob Silfverberg accidentally shot the puck into his own net.

Comtois scored the go-ahead goal 11:31 into the third period, but Karlsson tied it with 2:12 left and the goalie pulled for an extra skater.

”It was an up-and-down game,” Eakins said. ”There was a ton of emotion in the game, a ton of emotion on our bench. When you can bend and not break, and when you can learn to channel your emotions in the right direction, I think it’s a great learning experience.”

NOTES

Karlsson’s hat trick was the first by a defenseman in Sharks history. He leads NHL defensemen with nine goals and 15 points. … Quinn remained at 99 career victories as San Jose fell to 1-6 at home. … Ducks C Sam Carrick, recovering from hip surgery in May, was assigned to the San Diego Gulls of the AHL on a long-term injury conditioning loan.

UP NEXT

Ducks: At Vancouver on Thursday night.

Sharks: Host Florida on Thursday night.

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