Logan Couture scored twice after missing the morning skate with an illness, and the San Jose Sharks snapped a four-game losing streak by holding off the Anaheim Ducks 6-4 on Saturday night.

Tommy Wingels added a goal and three assists, and Joe Pavelski, Tomas Hertl and Matt Nieto also scored for the Sharks, who have won six straight home games against the Ducks. Antti Niemi made 30 saves.

Corey Perry scored twice, Ryan Getzlaf had a goal and two assists, and Matt Beleskey also scored for the Ducks, who fought back from a 5-1 deficit to make it a one-goal game early in the third period.

Frederik Andersen allowed five goals on 19 shots before being pulled with 13:51 left in the second period. Jason LaBarbera stopped all 15 shots he faced in relief.

Perry scored twice in a span of less than 2 minutes bridging the second intermission off assists from Getzlaf to get the Ducks back into the game.

Getzlaf then made it 5-4 later in the third just seconds after Niemi robbed Perry of a hat trick with a pad save. The Ducks started the night with Getzlaf and Perry skating on different lines but changed up after getting into the early hole, and almost staged an epic comeback.

Matt Nieto ended that chance when he scored an empty-net goal on the power play in the closing minute to seal it for San Jose.

The Sharks got off to a fast start after going four straight games without holding a single lead at any time. They outshot Anaheim 14-5 to take a 3-1 lead after one period.

This marked the second time this season San Jose snapped a four-game skid by beating the Ducks. The Sharks won 4-1 on Oct. 26 in Anaheim in a game that featured 165 penalty minutes.

This game wasn't nearly as contentious but the Sharks still came out ahead as they again played to the competition. San Jose has two wins over the Ducks, as well as victories at Los Angeles and Tampa Bay, but has lost all four games against the bottom two teams in the Eastern Conference, Columbus and Buffalo.

Couture, whose status for the game was up in the air until the pregame skate, was the beneficiary of a bounce to get things started. Patrick Marleau's point shot ended up on his stick, and he beat Andersen to give San Jose its first lead in 259:05 of game action since the Sharks beat Carolina 2-0 on Nov. 16.

After Beleskey tied it 1:46 later, Couture restored the lead with a short-handed goal. He won a race to a puck at center ice after Hampus Lindholm misplayed it at the point. Couture then skated in on a breakaway and beat Andersen to make it 2-1.

Pavelski added a power-play goal with 13.6 seconds left in the period off a pass from Joe Thornton after Jakob Silfverberg took an offensive zone penalty.

San Jose ended Andersen's night early with two goals in the opening 7 minutes of the second period with Wingels deflecting a point shot from Marleau for the first, and Hertl capitalizing on a turnover by Josh Manson with the second.

NOTES: D Eric Brewer made his debut for Anaheim a day after being acquired from Tampa Bay. ... The Sharks improved to 9-2-2 when scoring first but have won just twice in 12 games when allowing the first goal.