Jannik Hansen scored the tiebreaking goal with 5:03 remaining and the Vancouver Canucks snapped a nine-game losing streak by beating the San Jose Sharks 4-2 on Thursday night.

Daniel Sedin and Bo Horvat scored in the first period and the Canucks rebounded after blowing another late lead to avoid matching the longest losing streak in franchise history. Markus Granlund added an empty-net goal and Ryan Miller made 32 saves to help Vancouver earn its second win in San Jose in March.

Patrick Marleau and Logan Couture scored for the Sharks, who lost for the 22nd time at home this season and will now likely have to open the playoffs on the road. San Jose is five points behind Los Angeles and four back of Anaheim in the Pacific Division with the Kings having one game in hand and the Ducks two.

Martin Jones made 22 saves.