SAN JOSE, Calif. -- Antti Niemi played in his 24th consecutive game Tuesday night, and given the choice, he'd rather be back in the goal again for the next game.
Niemi made 24 saves, helping the San Jose Sharks rally to beat the Dallas Stars 3-2 and clinch a playoff spot.
"We're almost there," Niemi said, "but we still need the points."
With two games left, the Sharks (25-14-7) are tied with the Los Angeles Kings for fourth place in the Western Conference, but the Kings hold the tiebreaker. The St. Louis Blues are one point back in sixth place.
Joe Pavelski and Logan Couture scored within 30 seconds of each other late in the third period for the tying and winning goals.
"It's awesome," Couture said. "We got the two points, and we know we're going to the playoffs. That was our number one goal from the beginning."
Raffi Torres also scored for the Sharks, who have won four of their past five.
The Sharks play at Los Angeles in the regular-season finale Saturday, but first Phoenix plays the Coyotes in the Phoenix on Wednesday night.
"We can't overlook that (Phoenix) game if we want to be playing at home early next week," Sharks coach Todd McClellan said. "It's a sense of relief but not a sense of relaxation."
Antoine Roussel and Loui Eriksson each scored a goal for the Stars, who lost their second straight to remain in the 10th spot in the West. Dallas (22-20-4) is three points behind the eighth-place Columbus Blue Jackets. The Stars finish with two home games, Thursday against Columbus and Saturday against the Detroit Red Wings, the two teams directly in front of them.
"It's desperation, do or die," Stars center Jamie Benn said. "Just like it was do or die tonight. We didn't get it, but there are still four points out there, so you never know what will happen."
The Stars failed to complete a sweep of the Sharks in the season series, a feat they were attempting to complete for the first time since the 2002-03 season.
"Who cares about that?" Dallas forward Ray Whitney said. "It's the outcome we need. That's irrelevant. We need to play hard for 60 minutes and win."
Stars goalie Kari Lehtonen made 34 saves, many of them on point-blank shots.
"He was fantastic," Dallas defender Stephane Robidas said. "He kept us in the game. He made huge saves. They came at us pretty hard, and he was amazing."
Every Stars player remained in the locker room following the defeat, an anomaly in the NHL. It was a symbolic gesture of staying together, win or lose. They spoke only in hushed tones as they considered their circumstances.
"It's very disappointing right now," Robidas said. "I think everyone has shown a lot of character. We were going so good, and we had a lot of positives. It would have been nice to get at least a point."
The atmosphere was completely different in the winners' locker room.
Pavelski scored with 5:37 remaining in the game, redirecting a Brad Stuart shot after Brent Burns dug it out of the corner. It was Pavelski's 150th career goal, his 16th of the season, and it tied the game.
"We were right there the whole game," Pavelski said. "The lines were rolling pretty much the last five, 10 minutes. I knew it was coming. I just wanted to be ready to get a stick on it. It was an awesome atmosphere out there."
Couture scored 30 seconds later, taking advantage of a Dallas turnover. Patrick Marleau fed him the puck, and Couture found an opening from the left side.
"Patty made a great play to give the backdoor," said Couture, who scored his 20th goal. "It's crazy around here, and it's not over yet."
The game was played at a frantic pace. The Stars utilized an aggressive forecheck to slow down San Jose, while the Sharks got themselves into trouble with too many visits to the penalty box in the first period.
San Jose struck first, scoring on a power-play breakaway that featured precision passing from Martin Havlat to Scott Gomez to Torres, who lifted the puck into the top left corner with 7:07 left in the first period.
"We had to slow down their momentum," Benn said. "They came at us pretty hard. They tipped one in, and the next shift you have a breakdown and then it's in the back of our net."
The Stars scored less than 2 1/2 minutes later to tie the game. Roussel was on top of a rebound off Niemi's pads and threw it into the net. Cody Eakin took the first shot.
The Sharks rode out a 5-on-3 penalty kill over the final minute of the first period, even getting a chance at a short-handed goal. The shot was blocked by Lehtonen.
Dallas came out of the first intermission charged up and was able to take advantage of its superior numbers to take a 2-1 lead. Eriksson backhanded a rebound past Niemi following Alex Goligoski's long shot.
Roussel scored a goal in his third straight game, while Eriksson made it two consecutive games. Whitney has recorded 12 points over his past nine games.
NOTES: Stars rookie forward Alex Chiasson, who has a pair of goals against the Sharks this season, missed his fourth straight contest with a shoulder injury. ... Sharks defenseman Jason Demers missed his second consecutive game with a lower-body injury. ... The San Jose chapter of the Professional Hockey Writers' Association nominated forward James Sheppard for the Bill Masterton Memorial Trophy. The Dallas chapter nominated Whitney, who began his career with the Sharks 20 years ago. The award honors a player for perseverance, sportsmanship, and dedication. ... Niemi was honored as the Sharks' Player of the Year by the Bay Area media. Defenseman Matt Irwin was named the team's Rookie of the Year, and Marleau was selected the Fan Favorite.