VANCOUVER, British Columbia — Jacob Markstrom spent a little longer than usual peeling off his equipment. After a stellar performance that nearly got him the first shutout of his NHL career, the Vancouver goalie took some extra time to decompress.

Markstrom stopped 35 shots to lead the Canucks to a 2-1 victory over the Toronto Maple Leafs on Saturday. Markus Granlund and Alexander Edler scored for Vancouver, which was coming off a 3-2-1 trip.

“He won the game for us,” Canucks forward Daniel Sedin said. “The last 40 minutes, it was all Toronto.”

Markstrom actually had the Leafs’ number for more than 57 minutes before James van Riemsdyk finally got one past him on a tip off a point shot with 2:52 left in the third.

The hulking Swede, who has now gone 114 career starts without a shutout, jokingly pretended to ignore questions about the streak, but eventually came around.

“I’ve had maybe 10 or 20 games where it’s like this,” Markstrom said of losing a shutout late. “What do you have to do for it? It is what it is. You can’t beat yourself up.

“You want to get rid of it and make it happen, but I’d take this any day of the week, for sure.”

Granlund and Edler scored in the first period to put the Canucks up 2-0 and they took that lead into the third. Toronto pinned Vancouver deep in its zone in the opening minutes of the final period, with Connor Brown coming close a couple of times.

Despite getting outshot 21-5 since the first, the Canucks had a great chance seven minutes into the third when Andersen stretched to rob Loui Eriksson with his pad to prevent Vancouver from extending its lead.

Toronto continued to press, with defenseman Morgan Rielly completely whiffing on an open net with three minutes to go before van Riemsdyk tipped home his 13th of the season to get the Maple Leafs within one.

But the Canucks survived a frantic finish that included the puck just rolling off the stick of Auston Matthews in the closing seconds.

“We had to work tonight, we had to defend hard,” said Canucks head coach Travis Green, whose team had just nine shots after the first period. “A lot of guys paid a price to get a win.”

Frederik Andersen finished with 24 saves as the Maple Leafs snapped a two-game win streak and lost for just the fourth time in 13 games (9-3-1).

“We generated a lot of pressure,” Andersen said. “They did a good job of not letting us get to those opportunities for rebounds.”

The Canucks opened the scoring at 4:52 of the first when Granlund ripped his fourth of the season, and first point in seven games, on a shot past the stick of Leafs defenseman Nikita Zaitsev that Andersen could only wave at.

With an electric atmosphere inside Rogers Arena for the Leafs’ only visit there this season, Vancouver then went ahead by two at 11:14 after a dominant shift by the Sedin twins where the Canucks controlled the puck for 28 seconds in the offensive zone on a delayed penalty. Henrik Sedin eventually found Edler with a pass from the right corner, and the defenseman got his first of the season.

Outshot 17-11 in the first, the Leafs had the first 10 of the second period as they pressed to get back in the game.

William Nylander blasted an effort on the power play that Markstrom got a piece of before the puck hit the crossbar and stayed out before the Vancouver goalie also thwarted Nazem Kadri moments later from the slot.

Vancouver’s first shot of the period came with just over eight minutes left when Brock Boeser jumped on a turnover and fired a one timer that Andersen did well to keep out.

Notes: Before the game, Vancouver honored Daniel Sedin for getting his 1,000th career point in Thursday’s 5-3 victory at Nashville. Sedin is the 87th player in NHL history to reach the milestone, joining twin brother Henrik Sedin, who accomplished the feat last season. Canucks F Derek Dorsett, who announced an end to his playing career Thursday because of spinal problems, was on the ice before the game to hand Daniel Sedin the silver puck to commemorate the milestone. … Leafs C Tyler Bozak missed the game with an illness.

UP NEXT

Maple Leafs: Host Calgary on Wednesday night.

Canucks: Host Carolina on Tuesday night.