SAN JOSE -- Logan Couture scored his third NHL hat trick, and Evander Kane had two assists in his first game against his former team to help the San Jose Sharks to a 5-1 victory against the Buffalo Sabres at SAP Center on Thursday.

Couture scored in the first period and twice in a three-goal third. He had his first two hat tricks on the road, against the Vancouver Canucks on March 29, 2016, and against the New York Islanders on Oct. 21, 2017. He said it was special scoring three times in a game at home.

"It took me a long time to get my first one and now two in the last three years," Couture said. "I'll take them when they come."

[WATCH: All Sabres vs. Sharks highlights]

Kane also had five shots and three hits against the Sabres, who traded him to the Sharks on Feb. 26.

"It's fun," Kane said of playing Buffalo. "We needed that win bad coming off a long road trip and blowing a couple of third-period leads. We wanted to make sure we came out strong and lock them down and spend a lot of time in their end. I thought we did a good job of that tonight."

Video: BUF@SJS: Couture records third career hat trick

Joonas Donskoi and Joe Pavelski also scored, and Martin Jones made 24 saves for the Sharks (3-3-1), who defeated the Sabres for a fourth straight time.

Jake McCabe scored for Buffalo (3-4-0), and Carter Hutton made 34 saves.

The Sharks entered the game 2-for-21 on the power play but went 3-for-7. The Sabres were 0-for-5. For most of the night, defensemen Brent Burns and Erik Karlsson played on different units instead of together.

"I think changing that up and having both of those guys on different units to get the middle of the ice where they're both comfortable," Couture said. "It felt better as a participant on the power play and I'm sure it looked better from up top. Both those guys are comfortable in that spot. They both wanted to be there. I think that gives us two strong units now."

The Sharks scored twice on the power play after Sabres forward Kyle Okposo drew a double-minor for high-sticking Rourke Chartier at 1:45 of the first period.

Donskoi deflected a Karlsson shot from above the right face-off circle for a 1-0 lead at 3:35, and Couture made it 2-0 at 4:02 with a snap shot from above the left circle.

"Right from the start it got us kind of going, got everyone excited, got the energy in the building," Pavelski said.

Video: BUF@SJS: Pavelski cleans up own rebound for PPG

Buffalo cut San Jose's lead to 2-1 on McCabe's first goal of the season at 1:35 of the second period.

"When special teams are struggling as much as it is and power plays are struggling you've got to go back to work and go back to simplicity," McCabe said. "Look at their power play, it was nothing special, they're getting pucks to the net and bodies to the net and it creates chaos and it's tough to defend."

Couture increased the lead to 3-1 at 4:54 of the third period when he knocked a Kane rebound into a wide-open net.

Pavelski scored on the power play at 11:49, making it 4-1, and Couture completed the hat trick with an empty-net goal at 18:13 for the 5-1 final score.

The Sharks took leads into the third period of their two previous games but lost 3-2 in overtime to the New York Rangers on Oct. 11 and 3-2 to the New Jersey Devils on Sunday.

"We wanted to make sure we aren't going to be a team that lets third-period leads slip away," Kane said.

They said it

"I think we're going to evaluate everything. I think we had key times in the game that our power play could've shined and we didn't execute. I think one of the things we have to get back to is just shooting pucks and keeping it simple." -- Sabres coach Phil Housley

"Obviously something that we haven't had, and when you get it, it makes a big difference. We scored enough goals. I think it gave us a little bit of a comfort level there, and some confidence. " -- Sharks coach Peter DeBoer on the power play's success

Need to know

Sabres center Patrik Berglund was scratched for the first time this season. Remi Elie replaced him in the lineup. ... Sharks defenseman Marc-Edouard Vlasic played his 900th NHL game, all with the Sharks. Only Patrick Marleau (1,493) and Joe Thornton (963) have played more. ... Thornton (knee) missed his fifth straight game. … Sharks forward Timo Meier has four points (two goals, two assists) during a four-game point streak.

What's next

Sabres: At the Los Angeles Kings on Saturday (3:30 p.m. ET; SN1, FS-W, MSG-B, NHL.TV)

Sharks: Host the New York Islanders on Saturday (10:30 p.m. ET; NBCSCA, MSG+, NHL.TV)

Video: Couture records hat trick as Sharks down Sabres, 5-1