SAN JOSE, Calif. (AP) — Tyler Toffoli and Dillon Dube both scored in the first 30 seconds, Nazem Kadri got the go-ahead goal midway through the third period and the Calgary Flames beat the San Jose Sharks 7-3 on Tuesday night.

Toffoli finished with two goals and an assist, and Kadri also scored twice. Trevor Lewis and Milan Lucic had the other goals for the Flames, who scored four unanswered in the final 9:56 after the game was tied at 3.

Jonathan Huberdeau and Elias Lindholm each had three assists. Lucic, who assisted on Kadri’s tiebreaking goal, has scored his first two goals of the season in the past two games.

Jacob Markstrom made 24 saves for back-to-back wins over the Sharks.

Toffoli scored 15 seconds in and Dube followed 15 seconds later, tying them for the fifth-fastest two goals to start a game in NHL history.

Sharks forward Nico Sturm scored on a tap-in for his ninth of the season. Timo Meier and Alexander Barabanov also scored for San Jose. James Reimer made 32 saves.

Meier has goals in consecutive games.

The Sharks struggled to gain much traction until late in the game. It showed as they were outshot 24-14 through two periods. Barabanov’s goal came with 37 seconds left in the second period, which swung the momentum in San Jose’s favor.

Markstrom had to be steady in the third as the Sharks had 13 shots on goal. Meier tied it 3-all 3:58 into the period.

Lucic’s goal snuck through Reimer, making it 4-3 at 16;43. Toffoli added his second of the game into an empty net at 18:22, and Kadri scored again 20 seconds later.

HOT START

The record for the fastest two goals to begin a game was set by the Edmonton Oilers with two in 24 seconds at Los Angeles on March 28, 1982.

NOTES: Sharks forward Matt Nieto played in his 600th NHL game. D Matt Benning played in his 400th career game. … San Jose forward Luke Kunin had ACL surgery and is expected to miss six to eight months. … Mario Ferraro returned to the Sharks’ lineup for the first time since Nov. 25. … Flames defenseman Chris Tanev played his first game since Dec. 12. … Sharks forward Tomas Hertl was suspended two games for high-sticking Lindholm on Sunday.

UP NEXT

Flames: At the Los Angeles Kings on Thursday.

Sharks: Host the Minnesota Wild on Thursday.