The Sharks surrendered a two-goal third period lead, but a shootout conversion by Joe Pavelski gave San Jose a 4-3 win over the Anaheim Ducks on Saturday night at SAP Center.

Pavelski scored in the second round of the extra session, while Antti Niemi made saves on all three Ducks attempts.

The Sharks finished a perfect 5-0 on their season-long five-game homestand. Logan Couture, Patrick Marleau and Marty Havlat scored second period goals for the Sharks, who held off their Pacific Division rivals in what was their first meeting of the season.

The Sharks collected all 10 possible points on the homestand, allowing only two to the opposition, including a 4-3 shootout win over the Kings on Wednesday. They are alone in first place in the division with 41 points (18-3-5), and are 10-1-2 at home.

The Sharks scored three times in the second period to take a 3-1 lead.

First, Couture ended a seven-game goalless streak, when he deflected in a Marc-Edouard Vlasic floater from the point at 4:16.

The Ducks, and specifically goalie Jonas Hiller, gifted the Sharks the go-ahead goal. With his team on a power play, Hiller came out to play a puck that was tricking into the Anaheim zone. He threw it out into the high slot, where Marleau retrieved it, and gave it to Joe Thornton. The Sharks’ captain gave it right back before Hiller could return to the crease midway through regulation.

Havlat’s effort late in the period gave San Jose a two-goal cushion at the intermission. The Sharks forward drove the puck deep, and found Scott Hannan at the point. Hannan’s wrist shot bounced around in front of the net while Mike Brown was battling, and Havlat scooped up the loose puck before depositing a backhand for his second goal in 13 games.

Defenseman Alex Grant, playing in his first NHL game, brought the Ducks back to within 3-2 with seven minutes and 10 seconds to go in regulation. His shot handcuffed Niemi, and the puck bounced off of the goalie’s blocker and skipped across the goal line.

Later, Nick Bonino won an offensive zone faceoff to Ben Lovejoy, and Lovejoy’s shot had eyes in sneaking inside the far post with 3:15 left to make it 3-3.

Each team had a power play in overtime. Couture's strong move to the net drew a holding penalty on Corey Perry at 1:26 of overtime, but the Sharks didn’t look sharp on the advantage. The Ducks went on an abbreviated power play on Jason Demers’ holding minor with half a minute left, but they, too, were unable to score.