The Sharks fought all the way back to tie their game with the Philadelphia Flyers on Monday after falling behind by three goals early in the second period.

The only thing the Sharks were missing was a finishing touch.

Barclay Goodrow tied the game with a goal at the 17:36 mark of the third period, but the Sharks could not score in overtime despite having a power play. They also could not beat goalie Samuel Ersson in the shootout in a 4-3 loss to the Flyers at Wells Fargo Center.

Defenseman Jack Thompson and center Mikael Granlund also scored for the Sharks, who salvaged a point with the comeback and now own a 5-2-1 record since a 0-7-2 start to the season.

The Sharks trailed 3-0 early before William Eklund spearheaded a comeback, assisting on the goals by Thompson and Granlund with less than five minutes to go in the second period.

Goodrow then tied the game. A pass from Henry Thrun from inside the blue line was redirected right to Goodrow, who fought off a check and scored from beside the Flyers’ net.

After overtime, the Sharks could not score in the shootout, as Macklin Celebrini and Will Smith failed to convert their opportunities. Matvei Michkov and Travis Konecny both beat Sharks goalie Vitek Vanecek with their shootout chances.Goodrow’s fight against Flyers defenseman Nick Seeler at the 12:09 mark of the second period seemed to spark the Sharks, who didn’t look as engaged as they needed to be through the first half of the game.

Still, the Sharks trailed only 3-2 before the third period, thanks to some inspired play from Eklund and his line.

The Sharks gave up goals to Erik Johnson and Konecny in the first period and a breakaway goal to Michkov at the 5:09 mark of the second period to fall behind 3-0.

On the goal, Smith turned the puck over along the boards inside the Flyers’ zone, and two passes later, Michkov, who had split the Sharks’ defense, was in alone on Vanecek before he scored his fifth of the season.

Thompson’s goal came at the 15:29 mark of the second period, as he joined the rush and redirected a centering pass from Eklund past Ersson to cut the deficit to 3-1.

About three minutes later, Eklund kept moving his feet and carried the puck behind the net before passing to Granlund, who fired it high short side past Ersson to cut the lead to 3-2.

It wasn’t publicly known until close to game time whether Celebrini would play against the Flyers.

Monday morning, Sharks coach Ryan Warsofsky wouldn’t commit to playing Celebrini, saying at the time that the lineup for the game was still being finalized.

The Sharks do have separate plans to give Celebrini and fellow teenage rookie Smith occasional ‘development days’ through at least the first half of the season. The plan is to, at times, keep them out of the lineup to help both teenagers adjust to the NHL while also trying to mitigate the risk of injuries.

Smith has had four such days this season, including Sunday night when the Sharks beat the New Jersey Devils 1-0 behind goalie Mackenzie Blackwood’s 44-save performance.