TORONTO — Champagne and beer overflowed in the Yankees’ clubhouse, and soaked players chanted and danced on a puddle-strewn carpet in the first of what they hope will be several such celebrations.

With a 5-1 victory over the Toronto Blue Jays at Rogers Centre on Saturday, the Yankees reached 86 wins for the season and clinched an American League wild-card spot with a week to go. For a team that had emphasized rebuilding, it was a remarkable achievement by a mostly precocious group of players. Their youth and exuberance were on display in the cramped visitors’ clubhouse as they drank, cheered and poured beer on one another.

But outfielder Brett Gardner, 34, the longest-serving current Yankee, made sure to tell a few of them that the party should not be the final one of 2017. A playoff berth is nice, but these are the Yankees, and their real goal is to win a 28th World Series.

“We realize we’ve still got a lot of work to do,” Gardner said amid the jubilation, “but I think it’s also important for us to celebrate and to realize it’s a big accomplishment to make it back to the playoffs. There’s only 10 teams that get to play into the postseason, and we’re one of them.”