SAN JOSE, Calif. — Marc-Edouard Vlasic had his mind made up as soon as he picked up the loose puck.

"There was nobody back there, just went for it," Vlasic said. "I wasn't going to pass it, I was on a breakaway. I was just trying to put it in the back of the net. Put my head own, breakaway, cutting across and I was able to put it in."

Vlasic scored 1:24 into overtime to give the San Jose Sharks a 2-1 victory over the Anaheim Ducks on Tuesday night.

Joe Pavelski also scored for the Sharks, who snapped a two-game losing streak.

"There's a lot of good little things that we did well," Pavelski said. "We were on the attack, we just weren't cashing in or getting that bounce. The biggest thing was just, let's go win a period. It started off right and took until overtime to get one."

Chris Wagner scored for the Ducks, who had a two-game winning streak snapped.

"We had straight 'A' chances that we missed," Wagner said. "We got a point though."

Goaltender Jonathan Bernier, in just his second game with the Ducks, left the game following the first period with an upper body injury. He stopped 10 of the 11 shots he faced.

John Gibson, who led rookies in goal against average and shutouts last season, came on and stopped the first 25 shots he faced before allowing Vlasic's goal in a 1-on-1 situation.

"I thought both goaltenders and our penalty kill got us a point," Ducks coach Randy Caryle said. "We didn't create enough offence. We slapped the puck around and uncharacteristically didn't move the puck well."

Sharks goalie Martin Jones stopped 19 of 20 shots and improved to 3-5 all-time against the Ducks.

Pavelski gave the Sharks a 1-0 lead midway through the first period, stuffing a loose puck into the net, which came loose during the exchange. A review confirmed the goal.

Wagner tied the game late in the second period. Clayton Stoner tried a long shot from the left that bounced in front of Jones, who could not cover before Wagner slapped it into the net.

NOTES: San Jose's Joe Thornton entered the game with 70 points in 76 games against the Ducks. ... Pavelski has points in five of the first seven games. ... Wagner has two goals in his last three games. ... Bernier is 1-4-1 in eight games against the Sharks.

UP NEXT:

Ducks: Have played six of their first seven games on the road and host Nashville on Wednesday night.

Sharks: Opened at home and then played five straight on the road. They host Columbus on Thursday night.