BOSTON — As the ball landed safely in the Red Sox bullpen on Saturday, Gleyber Torres waved his right fist in the air, glanced toward the Yankees dugout and smiled as he rounded the bases. It was a small gesture to commemorate a big moment.

Torres had just hit the Yankees’ 265th home run of the season, breaking a tie with the 1997 Seattle Mariners for the most home runs by a major league team in a season.

Torres was batting ninth in the Yankees’ 8-5 victory over the Red Sox on Saturday — their 100th win of the season — and his spot in the lineup meant the Yankees had another major league record. They became the first team to hit at least 20 home runs at all nine positions in the batting order.

That Torres struck the record blow from the ninth spot was appropriate because the Yankees rely on more than a couple of gargantuan thumpers in the middle of the order. This record was achieved as a team, and players like Torres and his fellow rookie Miguel Andujar have been critical factors in the onslaught.