The Rangers won their regular-season finale on Saturday, but will have to wait a little longer to determine their first-round opponent.

With two points from a 3-2 defeat of the Red Wings in a matinee at Madison Square Garden, the Rangers have 101 points, putting them in third place in the Metropolitan Division. The third-place team faces the second-place Pittsburgh Penguins.

But the Islanders, with 99 points with two games to play, including tonight against the Sabres in Brooklyn, could still finish in third, pushing the Rangers to fourth place, and the wild card spot. They would need three points against the Sabres and the Flyers tomorrow to finish ahead of the Rangers. The wild-card team would face the Atlantic Division champion Florida Panthers in the first round.

With the score tied at 1, Dylan McIlrath’s wrister from the right boards was tipped past Jimmy Howard by Kevin Hayes with 5:38 left in regulation. Oscar Lindberg, who also assisted on that goal, scored an empty-netter with 2:36 to go. Justin Abdelkader scored with 1:34 left, and the Rangers killed off a 6 on 3 with 20 seconds left, but the Wings qualified for the playoffs anyway, with Boston’s 6-1 loss to Ottawa that eliminated the Bruins.

Antti Raanta, who made 31 saves, was outstanding subbing for Henrik Lundqvist, and won his 11th game.

One negative development: Eric Staal went down and then left the ice hunched over after being struck in the head during a scrum in the faceoff circle. It appeared that Jesper Fast accidentally made contact with his left skating through the circle.

The Red Wings appeared to take a 1-0 lead at 2:42 of the first period, when Joakim Andersson swiped in a rebound off a 2 on 1 past Raanta. But the Rangers challenged that the play was offside, and a review overturned the goal, determining that Andersson was indeed offside. The Rangers are 4 for 10 on challenges this season.

There were few shots through the middle of the period, and when Marc Staal went to the box for high-sticking with 4:54 left, the Red Wings had a chance to tie. But Henrik Zetterberg negated the power play 20 seconds later with a holding penalty.

Boyle’s goal came on a 2 on 1, when he came down the right side and rather than attempt to pass, shot low and beat Howard for his 10th of the season and a 1-0 lead at 16:24. Chris Kreider’s assist was his sixth point in the last six games.

In the second, with Rick Nash in the box for tripping, Pavel Datsyuk’s wrister from just below the left point struck Riley Sheahan’s elbow in front and bounced past Raanta’s high stick side at 6:42

The Rangers played without injured defensemen Ryan McDonagh and Dan Girardi, as well as forwards Mats Zuccarello and Viktor Stalberg.