The New York Yankees clinched an AL wild-card spot Thursday night, ending a two-year absence from the postseason by beating the Boston Red Sox 4-1.

Carlos Beltran and rookies Greg Bird and Rob Refsnyder all homered for the Yankees in the franchise's 10,000th regular-season win.

CC Sabathia (6-10) won for only the second time since the All-Star break.

Putting behind the venerated generation of Derek Jeter and Mariano Rivera, the Yankees open the playoffs with a winner-take-all game Tuesday, against either the Astros, Angels or Twins.

New York had failed to reach the playoffs in consecutive years for the first time since its 1982-93 drought, just before the start of a golden age that included five World Series titles and seven AL pennants from 1996-2009.

But these Yankees bear little resemblance to even their last postseason team of 36 months ago.

Among the players swept by Detroit in the 2012 AL Championship Series, only Alex Rodriguez, Brett Gardner, Mark Teixeira and Sabathia remain, and Teixeira will miss this postseason because of a broken leg.

Now Beltran, Jacoby Ellsbury, Chase Headley, Brian McCann and Didi Gregorius support a creaky starting rotation, a strong back end of the bullpen and sputtering middle relievers. Masahiro Tanaka is lined up to pitch the wild-card game.

After losing the first three games of the series, New York built a 2-0 lead in the second against Rich Hill. Beltran hit his 19th homer, an opposite-field drive over the right-field scoreboard, No. 9 hitter Brendan Ryan singled in a run for his first RBI since July 31.

Sabathia (6-10), mixing a fastball in the 88 mile-per-hour range along with a slider and changeup, allowed six hits in five innings, including an RBI single to Mookie Betts in his final frame.