Josh Anderson drew Montreal within 3-2 at 16:26 of the third period when he deflected Matheson’s slap shot from the point with Montembeault pulled for an extra attacker.
Blackwood made three saves in the final two minutes, when the Canadiens attempted 10 shots with Montembeault on the bench again, four of which were blocked.
“I thought our start was just OK, and then I thought we got better and better as the game went on,” Quinn said. “And you don’t go through with what we’ve been through and all of a sudden feel great about yourself; you’ve got to earn it. And we started earning it shift after shift and that’s how we have to get out of this, and we took a big step today.”
The Sharks have won eight straight in Montreal since a 2-0 loss on March 21, 2015.
“I don’t know if it was necessarily our opponent that caused us to play the way we did tonight,” Matheson said. “I think the fact of the matter is we just needed to be better.”
NOTES: San Jose has had four longer losing streaks, including a string of 17 in 1992-93, tying the 1974-75 Washington Capitals for the longest single-season losing streak in NHL history. … Matheson’s assist on Gallagher’s goal was his 200th NHL point. He has 201 points (64 goals, 137 assists) in 504 games with Montreal, the Pittsburgh Penguins and the Florida Panthers.