DALLAS -- Logan Couture's timing was perfect.
Couture broke out of a slump with a power-play goal to put his team in front late in the second period after T.J. Galiardi got the tying goal earlier in the period, and the San Jose Sharks beat the Dallas Stars 5-2 Tuesday night in a matchup of teams vying for one of the final Western Conference playoff spots.
Couture had gone 10 games without a goal when he snapped a 2-2 tie with a deflection of Martin Havlat's setup at 17:24 of the second period. Couture's 31st of the season came only 27 seconds after Dallas' Michael Ryder went to the penalty box for tripping.
"It had been a while, so it felt good to get on the board," Couture said. "(Havlat) made a great play to me. It's something we work on, on the power play. I went to the slot and he had the patience to wait `til I was open. It was right on my stick."
Antti Niemi stopped 29 shots, and Daniel Winnik, Joe Thornton and Ryane Clowe also scored for the Sharks. San Jose improved to 92 points to remain in the conference's top eight, three points better than ninth-place Dallas.
Niemi denied Dallas' Jamie Benn on a breakaway with about 5:20 left to preserve his team's lead, and Thornton's 17th goal of the season with 4:50 remaining gave San Jose a two-goal pad.
"Huge," Thorton said of Niemi's save on Benn. "If he doesn't make that, it's a totally different game. He's a world-class goalie ... who saved our bacon tonight."
Dallas, returning from a 1-3-0 road trip, is in danger of missing the playoffs for the fourth straight season.
"That one stings," Morrow said. "You'd like to be able to control your own fate, we had that tonight and we let it go and now we're going to need a lot of help."
Clowe added an empty-netter with 1:04 left and San Jose improved to 8-4-1 in its last 13 games.
The Stars had assumed the top spot in the Pacific with a 10-0-1 run, but they've gone 3-7-0 since then to tumble out of the conference's top eight.
Dallas has two games left: at Nashville on Thursday and St. Louis at home on Saturday.
"Now we need help and you just start preparing, getting ready for Nashville," Stars coach Glen Gulutzan said. "There's no other way to look at it. It's just business as usual and go win the game."
San Jose also has two remaining: at Los Angeles on Thursday, and home against the Kings on Saturday.
Dallas built an early 8-1 shots advantage, but Winnik banked in a rebound off a sprawling Lehtonen at 12:09 of the first period to put the Sharks in front. Andrew Desjardins and Brent Burns assisted on Winnik's eighth goal of the season.
Morrow got a fortunate bounce to draw his team even at 1 when he backhanded a shot from a sharp angle that glanced off Niemi's stick. The puck snuck through the goalie's pads and into the net at 17:47 of the first for Morrow's 11th of the season, assisted by Mike Ribeiro and Mark Fistric.
The Stars began a 5-on-3 power play with 20 seconds left in first period, with 38 seconds of it carrying over into the second period. But Dallas was unable to generate much pressure with the man advantage.
Goligoski gave his team a 2-1 lead at 11:10 of the second period. Benn carried the puck behind the net and fed Goligoski, whose slap shot from center point beat a screened Niemi for Goligoski's ninth of the season.
San Jose needed only 32 seconds after Goligoski's goal to pull even at 2 when Galiardi beat Lehtonen from the right of the cage for his ninth of the season.
"It was a great momentum swing for us," Thornton said.
The Sharks beat the Stars 3-0 on Saturday night in San Jose, the previous game for both teams.
"Very big, considering that four points went into our account and not into theirs," Sharks coach Todd McLellan said of sweeping the home-and-home set.
The Sharks won the season series 5-0-1. ... San Jose had been 1-6-2 in its previous nine road games. ... Dallas had been 6-2-1 in its previous nine at home. ... The Sharks were without D Douglas Murray (lower body). ... RW Radek Dvorak (ankle) was out for Dallas but LW Eric Nystrom (leg) returned from a three-game absence.