DETROIT -- Patrick Marleau helped San Jose start strong and finish well.
Marleau scored a short-handed goal early in the game and the shootout winner, lifting the Sharks to a 3-2 win over the Detroit Red Wings on Thursday night.
"It's huge," Marleau said.
San Jose, trying to earn home-ice advantage in the first round of the playoffs, briefly moved into fourth place in the Western Conference before the Los Angeles Kings beat Colorado to move back ahead by a point. Detroit is in eighth place.
Detroit's margin is very slim.
The Red Wings, clinging to the eighth and final playoff spot in the West, are hoping to extend the franchise's streak of consecutive post-season appearances to 22. They have hurt their chances by losing five of seven.
Detroit is just two points ahead of Phoenix, three ahead of Dallas and Columbus with Edmonton and Nashville lurking within striking distance.
The Sharks and Red Wings are the only teams who have been in the playoffs every season since the 2004-05 lockout.
"Anybody that has been in the playoffs knows they're pretty special," Red Wings coach Mike Babcock said. "You got to earn your right to play a playoff game."
Antti Niemi made 27 saves through overtime and Jimmy Howard stopped 28 shots for Detroit. Niemi got his glove on Niklas Kronwall's slap shot with 44 seconds left in the extra period, giving the Sharks a chance in the shootout and to earn a rare road win.
The Sharks have won just seven of 19 games away from home, including just two of their previous nine. They had lost two straight overall, including a 4-0 setback at Columbus, after a seven-game winning streak.
"Our road game has been lacking a little bit," Marleau said. "We came out strong in the first and showed a lot of resiliency in the third."
Detroit, meanwhile, has won only one of its last six home games.
The Red Wings looked like they might get a much-needed win and two points when Pavel Datsyuk opened the shootout with a goal, but Logan Couture slipped a shot between Howard's pads to tie it. Damien Brunner then was stopped by Niemi and Joe Pavelski got a shot past Howard, but hit the post. Detroit's Gustav Nyquist made a nifty spin move but was stopped by Niemi, and Marleau followed with the winner on a quick wrist shot.
"Some of the saves he made were unbelievable," Sharks coach Todd McLellan said. "And the shootout saves were flat out brilliant."
The extra goal and save, and the additional point that came with the shot and stop, puts San Jose five points ahead of Detroit in the standings.
McLellan, though, said his team can't be satisfied with the cushion.
"We're living day to day right now," McLellan said.
The Red Wings start a four-game road trip Friday night at Chicago and return home to play three of their last four games of the regular season.
San Jose's road trip continues Saturday at Dallas and Phoenix before finishing the regular season with four of six games at home.
At Joe Louis Arena, Marleau had a short-handed goal to put San Jose ahead 2:35 into the game. Detroit's Justin Abdelkader tied it midway through the second period.
The Red Wings took their first lead early in the third on Jakub Kindl's first power-play goal and quickly lost it. Couture scored 1:31 later on a power play to make it 2-all.
Detroit had a shot to get off to a good start when San Jose's Tommy Wingels was called for boarding less than a minute into the game, but the Sharks took advantage of a giveaway.
Henrik Zetterberg passed instead of shooting into a partially open net, Pavelski got in front of it, carried the puck deep into the Detroit on a 2-on-1 rush and perfectly set up Marleau for his team-high 17th goal.
"We had lots of hockey to overcome that," Babcock said.
Abdelkader scored on a one-timer from the bottom of the right circle to match his career high with an eighth goal midway through the second period.
San Jose couldn't clear the puck early in the third, allowing Zetterberg to make up for his costly mistake by making a centring pass on Kindl's go-ahead goal at the 2:29 mark. A little more than a minute later, Red Wings rookie Brendan Smith was called for holding and Couture took advantage of having extra space and an extra skater by tying the off a rebound.
"Both teams played desperate," Zetterberg said. "Unfortunately, we couldn't really finish it off when we had our chances there in the end."
NOTES: Howard said after the morning skate that he's "very, very close" to signing a contract extension with the Red Wings. ... San Jose D Brad Stuart played in his first game at Joe Louis Arena since playing for the Red Wings from their 2008 Stanley Cup championship season through last year. ... Detroit F Mikael Samuelsson, out with a chest injury, said he's feeling better each day, but doesn't have a timetable for his return. ... San Jose's Joe Thornton has a point in 13 straight games against Detroit.