The New York Yankees clinched a berth in the Major League Baseball postseason for the 16th time in the last 17 years with a 4-2 comeback victory over the Tampa Bay Rays on Wednesday.

Trailing 2-1 in the eighth inning, the Yankees rallied with a leadoff home run by Eduardo Nunez off Rays starter and loser James Shields (15-12) and a two-run double from Robinson Cano against lefty reliever J.P. Howell to grab the lead.

Mariano Rivera, pitching for the first time since he became Major League Baseball's all-time saves leader with his 602nd on Monday, added to his total by setting the Rays down in order in the ninth to give reliever Luis Ayala (2-2) the win and notch his 44th save of the season.

The Yankees improved to 94-60 and lowered their magic number to winning the American League East title to two.

It's the first step, Yankees manager Joe Girardi told reporters. We've got a slot now.

The win came in the first game of a day-night doubleheader scheduled to make-up for a previously rained out game. There was no celebration in the locker room of the 27-time World Series champions.

It's important. But we're playing to win our division, said Yankees captain Derek Jeter, who was on base when Cano delivered his booming two-run double over the head of Tampa Bay centerfielder B.J. Upton.

We still feel as though we didn't accomplish anything yet. Our goal is to win the division and we haven't done that yet.

The Yankees improvised their pitching lineup when scheduled starter Phil Hughes was unable to play due to back spasms.

Hector Noesi started in place of Hughes and was the first of eight pitchers stitched together by Girardi to get through the game.

New York took a 1-0 lead in the first inning on an RBI-double from Alex Rodriguez that scored Jeter, but the Rays went ahead 2-1 with a two-run home run by rookie outfielder Desmond Jennings in the third.

Noesi was removed in the third inning and a procession of relievers followed to hold down Tampa Bay until the Yankees playoff-clinching rally in the eighth.