SAN JOSE -- Jannik Hansen scored the go-ahead goal with 5:03 remaining, and the Vancouver Canucks ended their nine-game losing streak and damaged the San Jose Sharks' slim hopes of winning the Pacific Division with a 4-2 victory at SAP Center on Thursday.
Hansen scored his 20th goal on a breakaway after a San Jose turnover, beating goalie Martin Jones with a slap shot from the right circle. Markus Granlund scored an empty-net goal with 20.8 seconds left to seal the win for Vancouver (28-36-13), which is 1-8-1 in its past 10 games.
"Nine games is a lot of games to go between wins," Hansen said. "It was kind of starting to weigh on the team a lot of different ways. You don't want to get into where it's OK losing in any way. And we have been starting to play some better games, playing some good teams, but we found ways to lose. Today, we found a way to win."
The Sharks (43-29-6), who clinched a Stanley Cup Playoff berth Tuesday, trail the first-place Los Angeles Kings by five points and the Anaheim Ducks by four in the Pacific. The Kings defeated the Calgary Flames 3-0 at Staples Center. San Jose has four games remaining, Los Angeles has five, and Anaheim has six.
Video: VAN@SJS: Miller holds firm to deny Couture's shot
"We should be playing like we're fighting for our lives, and we didn't tonight," Sharks center Logan Couture said. "We made some mistakes that don't work in the playoffs. We need to be better."
Canucks goalie Ryan Miller made 32 saves; Jones made 22.
Vancouver built a 2-0 lead in the first period on goals by Daniel Sedin and Bo Horvat, but Patrick Marleau scored a second-period power-play goal to make it 2-1.
San Jose tied it 2-2 at 10:58 of the third when Couture took a pass at the bottom of the left circle from Brent Burns and beat Miller to the short side. Couture, who had his first NHL hat trick Tuesday in a 4-1 victory against Vancouver at Rogers Arena, has 14 goals despite missing a total of 30 games because of injuries.
Video: VAN@SJS: D. Sedin nets his 28th goal to open scoring
The Sharks had the momentum, but the Canucks grabbed it back when Joe Thornton's pass off the boards got past Burns in the Vancouver end and Hansen headed the other way on a 2-on-1 rush with Sedin.
"We pushed," San Jose coach Peter DeBoer said. "We were playing to win down the stretch. It would be easy to say we should have been a little more conservative, maybe not gone in there. But we had battled back and the momentum was on our side a little. We were pushing to win the game. That happens."
Hansen said he considered passing the puck.
"But I thought [defenseman Paul Martin] and the goalie maybe honored [Sedin] too much and gave me a little bit of room for myself," Hansen said.
Video: VAN@SJS: Hansen puts Canucks ahead with his 20th goal
The Canucks won for the first time since March 12, when they defeated the Nashville Predators 4-2 at home. Vancouver had not won a road game since defeating San Jose 4-2 on March 5.
It was the Sharks' first loss in three games.
Sedin scored off a rebound to give the Canucks a 1-0 lead at 1:09 of the first period. It was his 28th goal.
San Jose rookie forward Joonas Donskoi turned over the puck in the neutral zone, and the Canucks made the Sharks pay. Henrik Sedin sent the puck ahead to Hansen, who shot from the right faceoff circle. Jones made the save, but the puck ricocheted to Daniel Sedin, who scored on a slap shot from the left circle.
Video: VAN@SJS: Horvat steals the puck and nets backhand
"In this league, that's key," Daniel Sedin said of scoring first. "When you get the first one, it makes it a lot easier. So, for sure, that was the key. Then we get the second one right away. Good start, and I thought we played solid."
The Canucks made it 2-0 at 13:55 of the first period on an unassisted goal by Horvat, who stole the puck from Donskoi in the Sharks zone, skated hard left to right in front the crease and beat Jones with a backhand for his 13th goal.
"Everybody can see it was two big mistakes personally and we lost the game tonight with those," Donskoi said. "That's gone now. You can't take those back. I always like to think positive things. I had a lot of those mistakes in [the] Finnish League and usually I could not go forward after that. The positive thing is I didn't get stuck. I kept going normally and I think I didn't fold with those mistakes."
Canucks forward Sven Baertschi sustained an upper-body injury in the first and did not return.
Video: VAN@SJS: Marleau tallies one-timer for a PPG
Marleau cut Vancouver's lead to 2-1 at 14:30 of the second period, scoring his 22nd goal with Hansen in the penalty box for slashing Couture. Marleau took a pass in the slot from Thornton and beat Miller with a snap shot.
The Sharks will try to get back on track Saturday when they play the Predators to open a two-game road trip.
"We still have something to play for," Marleau said. "We need to get right back at it and get that focus back and play our game."
Canucks defenseman Christopher Tanev returned to the lineup after missing six games with an upper-body injury. Rookie defenseman Nikita Tryamkin also played after missing one game with an ankle injury.
Vancouver rookie forward Jake Virtanen served the first of a two-game suspension for a late hit Tuesday on San Jose defenseman Roman Polak. Linden Vey replaced Virtanen in the lineup.
Video: Canucks snap nine-game losing streak in 4-2 win