BUFFALO, N.Y. (AP) — Josh Anderson scored with just under four minutes remaining, leading the Montreal Canadiens to a 3-2 win over the Buffalo Sabres on Thursday night.

Dylan Cozens scored his third goal in four games and Jeff Skinner got his first of the season for the Sabres. Eric Comrie finished with 31 saves.

Buffalo had a season-high 45 shots on goal, but a season-low 4.4% shooting accuracy. Having led the NHL shooting 15.1% through the first five games, the Sabres have shot 5.9% in consecutive losses.

“I think the second period was our big, big opportunity,” Sabres coach Don Granato said. “I think there we complicated some things. We could have been a little bit more intense going to the net. We tried to pass the puck into the net. Feeling good about puck movement of possession time and didn’t have the killer instinct that we needed at that point, and it caught up with us.”

“We got lot of shots,” Cozens said, “but we need more bodies around the net to get those rebounds and get those greasy goals. Not every goal’s going to be pretty. So, I think that was something we need to work on, for sure.”

Cozens evened the score at 2 with 7:06 left in regulation, firing a wrist shot through traffic.

Anderson scored the winner with 3:46 left. Following a flurry of activity in front of the Buffalo net and a highlight-reel save by Comrie, the puck found its way back to Anderson, who scored on a long shot.

“I was just looking at an empty net and obviously their goalie made a nice save,” Anderson said. “You kind of just have to stay with it and finish the shift out and lucky Savvy had the puck there and saw me open and I was fortunate enough to get it off and squeak one in there at the end.”

With injuries on defense heading into the game, the Sabres paired two No. 1 overall picks together for the first time. Owen Power, the first pick in the 2021 draft, joined standout Rasmus Dahlin, the first pick in the 2018 draft, as the Sabres’ top defensive tandem.

Dahlin snapped his six-game point streak. After setting an NHL record for defensemen with goals in the first five games of the season, Dahlin had a chance to become just the fifth Buffalo player to record a point in seven consecutive games, and the first since Pat LaFontaine in October, 1993.

Kaiden Guhle gave Montreal a 2-1 lead just under seven minutes into the third period with a one-timer from the middle of the right circle.

The Canadiens opened the scoring on a fortunate bounce with 6:29 remaining in the first period. Brendan Gallagher’s shot from the right circle was stopped by Comrie, but the rebound deflected off Owen Power’s skate into the net.

Skinner evened the score 31 seconds into the second period on a terrific individual effort. The winger maneuvered through the right circle and forced Montembeault to commit before scoring his first goal of the season with a high shot to the glove side.

Sabres rookie Jack Quinn had an assist on Skinner’s goal for his first point of the season.

Buffalo hosts Patrick Kane and the Chicago Blackhawks on Saturday night in the second of a four-game homestand.