NEW YORK -- Sitting on Alex Cora's desk in the visiting manager's office at Yankee Stadium were two bottles of chilled champagne and a handwritten note congratulating him.
After waiting a few days, the Boston Red Sox finally got to break out the bubbly in the Bronx.
"It feels good, man. We're not going to hide it," said Cora, the rookie manager of the Red Sox. "We're going to celebrate. We're going to enjoy it. This is a tough division. That team we just played, they're amazing."
Betts homered, doubled twice and drove in five runs, finishing with four hits as Boston overcame Giancarlo Stanton's go-ahead grand slam in the fourth inning. Jackie Bradley Jr. hit a tying home run in the seventh and Xander Bogaerts put the Red Sox ahead with a sacrifice fly.
With a playoff berth already secured, Boston (104-49) closed out a once-tight division race with nine games to spare. J.D. Martinez and the Red Sox, alone in first place since July 2, will open the postseason at home in Fenway Park on Oct. 5 against an opponent to be determined.
"We haven't won what we want to win yet," Betts said in a champagne-soaked clubhouse.
Never before had Boston finished in first place three years in a row . The club needs one victory to match the franchise record held by the 1912 World Series champions.
Boston entered the three-game series needing a single victory to lock up its fourth AL East title in six years, but the second-place Yankees put the party on hold with two straight wins.
On their third try, the Red Sox earned a chance to celebrate at Yankee Stadium.
"To be able to do it here -- obviously we know the history," Cora said. "It feels great."
Craig Kimbrel whiffed a slumping Stanton for the final out, and the Red Sox strolled toward the mound to give each other hugs and high-fives in a muted celebration. They walked off the field and headed inside to cheers from Boston fans behind the third base dugout.
Inside a clubhouse dotted with discarded corks and lined in protective plastic, players wearing goggles and AL East championship gear sprayed bubbly, drank beer, posed for photos and reveled in the moment for about 30 minutes or so before packing up and heading to Cleveland.
Two years ago, in David Ortiz's final season, the Red Sox celebrated in the visitors' clubhouse at Yankee Stadium after wrapping up the division crown in New York. But that came in the wake of a loss -- after Mark Teixeira's game-ending grand slam gave the Yankees a comeback win.
"Kind of a stab in the heart," Betts recalled.
About 30 minutes earlier, the Red Sox had clinched when Toronto lost to Baltimore. So they went ahead and celebrated their season accomplishment with a booze-filled fiesta.
This time, they did it in style from start to finish.
"This is just the first step," outfielder Andrew Benintendi said. "We came into the year expecting to win. We knew what kind of team we had."
Brock Holt also homered for the Red Sox, and Martinez increased his major league-leading RBI total to 124 in a game that took 4 hours, 2 minutes.
"They just kind of weren't going to be denied today," Yankees manager Aaron Boone said.
New York's lead for the top AL wild card was trimmed to 1 1/2 games over Oakland, which routed the Angels 21-3. The Yankees' magic number to clinch a playoff berth is three over Tampa Bay.
A win in the wild-card game would likely give the Yankees another shot at Boston in a best-of-five Division Series.
Boston's magic number is two over Houston to clinch the best record in baseball and home-field advantage throughout the postseason.
"They've had a solid year. You can't deny that," Stanton said. "You never want it to be here that they get it. We gave it what we got. They can celebrate now. We've got time to celebrate later."
Betts, a top contender for AL MVP, opened the game with a double off the left-field fence against Masahiro Tanaka and scored on Martinez's single. Betts added a two-run single in the second, then doubled and scored in the fifth.
Bradley tied it 6-all with a leadoff homer in the seventh against Chad Green (8-3). Christian Vazquez singled, and Boston loaded the bases before Bogaerts delivered his sacrifice fly. Another run scored on the play when center fielder Aaron Hicks was charged with a throwing error.
Betts launched his 30th home run in the eighth, a three-run shot off All-Star closer Aroldis Chapman, who was activated from the disabled list Wednesday.
Luke Voit hit an early two-run homer, giving the Yankees a major league-record 12 players with at least 10 home runs this season. Stanton's seventh career slam left New York with 247 homers, breaking the franchise mark of 245 set in 2012.
Red Sox: INF Eduardo Nunez (left hamstring) sat out and probably won't play this weekend in Cleveland, Cora said. Nunez exited Wednesday night's game in the ninth inning after legging out an infield single. ... RHP Matt Barnes was available out of the bullpen for the first time in weeks. Barnes hasn't pitched since Sept. 3 because of left hip inflammation. Cora said he wouldn't put Barnes in a high-leverage situation right away. ... Betts was the DH again but will return to the outfield this weekend, according to Cora. Betts sat out Tuesday after tweaking his left side two days earlier. He was the DH on Wednesday. ... RHP Austin Maddox had rotator cuff surgery Wednesday in Los Angeles. Expected recovery time is about a year, the team said.
Yankees: Chapman also gave up a hit and a walk in his first outing since Aug. 21. He had been out with left knee tendinitis.
Red Sox: LHP Chris Sale (12-4, 1.92 ERA) is expected to throw about 65 pitches Friday night at Cleveland as he builds back up after missing time with a shoulder issue. All-Star RHP Trevor Bauer (12-6, 2.22) returns to the mound for the AL Central champion Indians in a potential playoff preview. Bauer has been sidelined with a broken right leg since he was struck by a line drive Aug. 11. Cleveland manager Terry Francona said Bauer will go a "couple of innings" before giving way to rookie Shane Bieber.
Yankees: CC Sabathia (7-7, 3.80 ERA) pitches Friday night at home against rookie RHP Yefry Ramirez (1-6, 5.50) and the last-place Orioles. Sabathia was tagged for five runs and seven hits over 2 1/3 innings in Saturday's loss to Toronto. He has one win in his last 11 starts.
More AP MLB: https://apnews.com/tag/MLB and https://twitter.com/AP-Sports
Reliever Chris Martin back with Braves on 2-year, $14 million deal
Chris Martin, whom the Braves acquired from the Rangers at the trade deadline last season, will return to Atlanta after signing a two-year, $14 million deal.
New York Mets' Yoenis Cespedes takes batting practice in return effort
Mets outfielder Yoenis Cespedes is taking batting practice in his effort to return from a slew of lower-body injuries.
Passan: Sign-stealing investigation still has a lot to unpack
Jeff Passan details how the initial sign-stealing investigation has been limited to the Astros, but could extend to other teams in the MLB.
Kornheiser: Minor leagues are the wellspring, foundation of baseball
Tony Kornheiser and Michael Wilbon strongly oppose a proposal by MLB to eliminate more than forty minor league teams.
In letter, Congress members express opposition to minor league overhaul
More than 100 members of Congress signed a letter Tuesday expressing their "firm opposition" to a proposal by MLB that would reportedly eliminate more than 40 minor league teams.
Manfred alludes to harsh punishments for sign-stealing
Major League Baseball commissioner Rob Manfred promises a thorough investigation into the sign-stealing allegations surrounding the Astros and that punishments could be severe.