Kevin Hayes scored with 5:38 remaining, Antti Raanta made 31 saves and the New York Rangers defeated the Detroit Red Wings 3-2 on Saturday.

Despite the loss, the Red Wings reached the playoffs for a 25th consecutive season when the Ottawa Senators beat the Boston Bruins. Detroit clinched third place in the Atlantic Division and will play the Tampa Bay Lightning in the first round.

Hayes tipped Dylan McIlrath's shot past Jimmy Howard for his 14th goal of the season to make it 2-1. Oscar Lindberg added an empty-net goal to make it 3-1.

Detroit's Justin Abdelkader scored with 1:34 remaining to cut the deficit to 3-2, but New York was able to kill off two late penalties and hang on for the win.

Riley Sheahan scored in the second period for the Red Wings and Howard made 17 saves.

Dan Boyle scored in the first period for the Rangers, who finished the regular season with 101 points.

Raanta got the start in goal for the Rangers in place of Henrik Lundqvist.

The Rangers still don't know their opponent in the Stanley Cup playoffs, which start Wednesday.

With the win Saturday, the Rangers have a chance to pass the Islanders and regain third place in the Metropolitan Division, and would play the Pittsburgh Penguins. If they remain the first wild card in the Eastern Conference, the Rangers would play the Florida Panthers. Either series would start on the road.

Trailing 1-0 entering the second period, the Red Wings controlled the play and outshot the Rangers 16-7. Detroit tied the game when Sheahan deflected Pavel Datsyuk's shot past Raanta for a power-play goal at 6:42.

With the teams skating 4 on 4 late in the first period, the Rangers opened the scoring when Dan Boyle and Derick Brassard had a 2-on-1 break. Boyle beat Howard with a wrist shot for his 10th goal of the season at 16:24.

The Red Wings nearly scored 2:48 into the game. Joakim Andersson poked a rebound past Raanta, but the goal was disallowed because the Red Wings were offside.

Raanta later made a strong save on Darren Helm with about 5½ minutes left in the period.

Detroit was coming off a 5-2 loss to Boston on Thursday. Forward Justin Abdelkader, who is third on the team in goals, left the game against the Bruins in the third period with a lower-body injury but played against the Rangers.

Rangers forward Eric Staal left the game with 1:51 to go in the second period and didn't return. It appeared that Jesper Fast accidently collided with Staal after a faceoff.

In addition to Staal, the Rangers were dealing with several other injuries. Forwards Mats Zuccarello and Viktor Stalberg missed the game with lower-body injuries. Zuccarello leads the Rangers with 61 points.

Defensemen Dan Girardi and Ryan McDonagh also were out. Girardi was injured Tuesday when he was hit into the end boards during a 3-2 victory against the Lightning. McDonagh hurt his hand blocking a shot in a 4-2 win Monday against the Columbus Blue Jackets.

Coach Alain Vigneault said Friday that Zuccarello, Stalberg and Girardi should be available for the start of the playoffs.

NOTES: The Red Wings have scored a power-play goal in nine of their past 11 games. ... Every team in the league is playing on Saturday. The regular season ends on Sunday with two games.