DENVER — Gabriel Bourque and Tyson Jost scored 2:14 apart in the second period, Jonathan Bernier stopped 39 shots and the Colorado Avalanche beat the San Jose Sharks 3-1 on Tuesday night.

Colorado returned from a six-game road trip and won its ninth in a row at the Pepsi Center, the club’s longest home winning streak since moving to Denver in 1995. The Avalanche are 19-7-1 at home this season.

Colorado struggled to generate many scoring chances without Nathan MacKinnon (left shoulder) and Mikko Rantanen (lower body), the team’s top two scorers. In their absence, the Avalanche were outshot 39-20.

The Sharks pulled goalie Martin Jones in the final minute and had a flurry of chances to tie it, but J.T. Compher iced the game with an empty-net goal with three seconds remaining.

Jones stopped 17 shots for the Sharks, who have won just twice in their last seven games. Joel Ward scored his first goal since Nov. 22.

San Jose had 16 of the first 20 shots but found itself down 2-0 early in the second.

Bourque opened the scoring 2:31 into the period after the Sharks turned the puck over in their own zone. Jost took control and pushed it ahead to Compher, who slid an expert pass along the crease to Bourque for his third goal of the season.

The Avalanche added to it as they connected on two long passes to set up Jost. The 19-year-old split two defenders just in front of the blue line and beat Jones’ glove for his fourth of the season.

Ward cut the deficit to 2-1 with 6:31 left in the period after scoring on a rebound. The goal was originally waved off, but video replay showed the puck snuck just inside.