SAN JOSE—Antti Niemi made 30 saves in his first game against the Blackhawks since leading them to the Stanley Cup championship last season to help the San Jose Sharks snap a three-game losing streak with a 5-2 victory on Wednesday.Patrick Marleau scored twice and Dany Heatley, Joe Pavelski and Jamal Mayers added goals to help the Sharks gain a small measure of revenge after being swept out of the Western Conference finals by Niemi and the Blackhawks six months ago.Niemi played all but one period of the Blackhawks’ run to the Stanley Cup title, going 16-6 with a 2.63 goals-against average and two shutouts.He stopped 129 of 136 shots in the Western Conference finals to help the Hawks sweep the Sharks but was allowed to leave as an unrestricted free agent when the Blackhawks decided not to pay him the $2.75 million salary he was awarded in arbitration.San Jose signed him to a $2 million, one-year contract shortly after and Niemi has struggled early this season with his new team. Sharks coach Todd McLellan gave him the nod against his former team in hopes it would spark Niemi. The move paid off.Using the same butterfly style that stymied the Sharks last May, Niemi held his former team in check. The Blackhawks had won five straight games in San Jose and nine of 10 overall against the Sharks.Niemi was at his best in the second period, helping kill off 44 seconds of a two-man advantage. One of his best saves came after Scott Nichol returned from his penalty. Niemi stopped Viktor Stalberg alone in front of the net to preserve a 3-1 lead.The Sharks had scored twice in the period to take the two-goal lead. Nichol helped set up the first one when he did a good job maintaining possession behind the net to extend the play. John McCarthy then took a pass from Nichol and fed Mayers for his first goal with San Jose to make it 2-0.The Blackhawks answered 31 seconds later when Jake Dowell’s pass from behind the net deflected off Jack Skille’s skate and then off Dowell for a goal.Pavelski restored the two-goal lead when he beat Marty Turco less than two minutes later with a slap shot from the slot for a power-play goal.Despite allowing a goal to Patrick Sharp early in the third, the Sharks managed to keep the lead after blowing a pair of two-goal advantages in the third period during their three-game losing streak.Marleau’s insurance power-play goal with 6:13 remaining off a nice feed from Joe Thornton ended Hawk hopes for a comeback. Marleau added an empty-net goal for the final margin. These teams have been up and down early this season after dominating the Western Conference a year ago. They are both in the middle of the pack as the Blackhawks have struggled to overcome the losses of Niemi and a host of other key players from their title team, and the Sharks have been unable to generate consistent scoring.San Jose was shut out at home 3-0 by Columbus in its previous game Saturday. That marked the fourth shutout already this season after being blanked just twice all of last season.The Sharks struck first this game thanks to a Hawk turnover in the defensive zone. Devin Setoguchi intercepted Nick Boynton’s clearing attempt and pushed the puck through Duncan Keith’s legs to Thornton. Thornton skated behind the net and fed an unguarded Heatley for the goal.