Marleau is the 12th player in NHL history to score four goals in a period, and the first since former Pittsburgh Penguins center Mario Lemieux on Jan. 26, 1997 against the Montreal Canadiens.

San Jose (30-16-2) won its season-high fifth game in a row to remain one point behind the first-place Anaheim Ducks in the Pacific Division.

DENVER -- Patrick Marleau had the first four-goal game of his NHL career, scoring them on four shots in the third period, to help the San Jose Sharks to a 5-2 win against the Colorado Avalanche at Pepsi Center on Monday.

"It was a good period to have," said Marleau, who had gone seven games without a goal and has 16 this season and 497 in his NHL career.

WATCH: All Sharks vs. Avalanche highlights

Defenseman Marc-Edouard Vlasic set up Marleau for his first goal, which came on a tip at 2:53 to break a 1-1 tie, and his fourth on a breakaway at 16:23 for a 5-2 lead.

Marleau said he started thinking about a hat trick after he scored his second goal at 5:57 on a wraparound, jamming the puck between the left post and goalie Spencer Martin's skate to give the Sharks a 3-1 lead.

Video: SJS@COL: Marleau records first career four-goal game

"[Sharks forward Logan Couture] said something to me on the bench, 'Let's go get that third one,'" Marleau said. "That's when you're thinking about it and guys are rooting for you, so it makes it fun."

Marleau completed his hat trick at 10:35 shortly after serving a hooking penalty, converting Joe Pavelski's pass on a 2-on-1 rush to make it 4-1.

"Great player," Sharks coach Peter DeBoer said. "Still a lot of gas left in the tank, a lot of juice left in those legs. Considering our schedule and his age (37), to play a game like that, that's an exceptional feat. It's an exceptional feat when you're 22, never mind 37 in the middle of seven games in 11 nights. He's a great player. It was great to be part of it."

Colorado (13-30-2), which lost its sixth consecutive game (0-5-1), was short one forward after center Matt Duchene was scratched because of illness shortly before the opening faceoff.

Video: SJS@COL: Iginla buries a one-timer for a PPG

"It's not an excuse," Avalanche coach Jared Bednar said. "We got lots of guys who are dying for ice time and who want to play more and more. That wasn't the reason we made poor decisions in the third period."

Marleau put a backhand over Martin's glove at 16:23 after the Avalanche cut it to 4-2 at 11:57 on a goal by Andreas Martinsen.

The Sharks took a 1-0 lead in the first period when defenseman Brent Burns scored from a sharp angle with one minute remaining for his 20th goal. He had two assists, giving him 15 points (five goals, 10 assists) in the past nine games.

The Avalanche tied it 1-1 on a power-play goal by Jarome Iginla at 10:02 of the second period. He beat goalie Martin Jones with a one-timer for his sixth goal and 617th of his NHL career.

Video: SJS@COL: Burns beats Martin from the boards

"We felt comfortable after two that we still hadn't played our best yet," DeBoer said. "Our second period was better than our first and we wanted our third to be better than our second. We felt if we could build on the second period we could take the game over, and that's basically what happened."

Goal of the game

Marleau completed his natural hat trick, putting in Pavelski's pass while skating down left wing.

Video: SJS@COL: Marleau finishes the natural hat trick

Save of the game

Martin denied Marleau at 4:30 of the second period after Marleau gathered in a saucer pass from Joe Thornton on a 2-on-1 rush.

Video: SJS@COL: Martin stones Marleau's two-on-one chance

Highlight of the game

Marleau scored his fourth goal on a breakaway with a backhand over Martin's glove.

Video: SJS@COL: Marleau roofs a backhand for his fourth goal

Unsung performance of the game

Burns can play defense too; he deflected Avalanche forward Nathan MacKinnon's goalmouth pass away from Mikhail Grigorenko early in the first period to keep the game scoreless.

They said it

"Sharks fans, you could hear them out there. The hats came on. It's exciting to see them come on the ice and everyone's happy for him. He's played real hard this year and he's had a lot of good lucks and for him to pick us up and get some big goals for us." -- Sharks captain Joe Pavelski on Patrick Marleau's hat trick

"He's a good player, been around for a long time. He's always had a knack for scoring goals, he's scored a lot of them. He's still got a lot of speed and lot of skill, and he showed that in the third." -- Avalanche forward Gabriel Landeskog on Patrick Marleau

Need to know

Marleau scored his 96th NHL career game-winning goal, tying Mats Sundin for 10th place on the all-time list. ... Sharks forward Joonas Donskoi was limited to three shifts in the first period and one in the second because of an undisclosed injury.

What's next

Sharks: At the Winnipeg Jets on Tuesday (8 p.m. ET; TSN3, CSN-CA, NHL.TV)

Avalanche: Host the Vancouver Canucks on Wednesday (9:30 p.m. ET; SN360, SNP, ALT, NHL.TV)

Video: Marleau lights lamp four times in Sharks' 5-2 victory