The New York Yankees’ power prowess has tied the two-decades-old major league record for the most home runs by a team in a season.

Sep 28, 2018; Boston, MA, USA; New York Yankees right fielder Aaron Judge (99) rounds the bases after hitting a home run during the eighth inning against the Boston Red Sox at Fenway Park. Bob DeChiara-USA TODAY Sports

When Aaron Judge hit his 27th of the year and the Yankees’ fourth of the game in the eighth inning of their 11-6 win Friday night in Boston, it gave the Bronx Bombers 264 homers for the season, matching the number hit by the Seattle Mariners in 1997.

The win also clinched the right to host the American League wild-card game on Wednesday against Oakland, with the winner advancing to face the Red Sox in the Division Series next Friday in Boston.

Led by Giancarlo Stanton’s 37 homers, the Yankees have 12 players in double digits, with six of those players having at least 23. Judge, Aaron Hicks, Miguel Andujar and Didi Gregorius are all tied for second on the team with 27.

Hicks also hit his 27th on Friday night.

“The fact that it’s come from so many different people, I think that has been the cool thing,” manager Aaron Boone said. “If you would have told us we were going to break that record at the beginning of the year, you probably would have thought Giancarlo is hitting 50 or 60, Judge is hitting 50 or 60.

“Because of injuries and different things, that hasn’t been the case. We’ve gotten a lot of production from a lot of different people who have had a big hand in that.”

Judge called the milestone “exciting.”

“We’ve got a lot of guys on this team with a lot of thump. They’ve been doing it all year, especially once we added (Luke) Voit. What he’s been doing for us has been huge. Now that we’ve tied the record, let’s go out there and break it,” Judge said.

Voit, acquired from the St. Louis Cardinals in late July, hit his 14th homer of the season and ninth this month on Friday. Also going deep was Gary Sanchez, his 18th.

The 1997 Mariners were led by Ken Griffey Jr.’s 56 home runs, and Jay Buhner slugged 40. Paul Sorrento was third at 31, followed by Edgar Martinez’s 28.

The Mariners won the American League West that year with a 90-72 record before losing to the Baltimore Orioles in the ALDS.

Friday’s blast was Judge’s first home run since he spent seven weeks on the disabled list with a fractured right wrist.

Judge said he and his teammates realized early on that their team could make home run history.

“We talked about (the record) once we started getting closer, especially early in the year, when we looked at our lineup and what type of firepower we had,” Judge said. “It’s great to tie it, and hopefully these next couple of days, we’ll hit a couple more.”