NEW YORK — The Red Sox clinched the AL East on Wednesday night despite wasting a three-run ninth-inning lead in a 5-3 loss to the Yankees.
Boston, which last weekend secured at least a wild-card spot, was assured of the division title earlier when the Orioles rallied for a 3-2 win at Toronto. But New York came back against Craig Kimbrel and Joe Kelly.
Mark Teixeira hit a winning grand slam with two outs in the ninth inning as the Yankees staved off playoff elimination.
After bouncing back from consecutive last-place finishes to win their eighth division title, the Red Sox open their postseason schedule Oct. 6 seeking a second World Series crown in four years.
With David Ortiz nearing retirement after the season, the Red Sox got to celebrate in the Bronx, the site of so much Boston heartache.
It wasn't the best way to do it.
New York had only an infield hit and trailed 3-0 heading into the ninth, but Kimbrel gave up a leadoff single to Brett Gardner and issued three straight walks, the last forcing in a run.
Joe Kelly came in and struck out Starlin Castro and retired Didi Gregorius on a foul popup. With the Yankees down to their last out, Teixeira, planning to retire after this season, launched a 99 mph fastball on an 0-and-1 count into the New York bullpen in right-center.
ORIOLES 3, BLUE JAYS 2: Hyun Soo Kim hit a pinch-hit two-run homer in the ninth inning off Roberto Osuna, and visiting Baltimore moved within one game of AL wild card-leading Toronto.
MARINERS 12, ASTROS 4: Robinson Cano hit a three-run homer in the first, and visiting Seattle stayed two games behind the Orioles for the second AL wild card.
ROYALS 5, TWINS 2: Host Kansas City rallied but was eliminated from playoff contention a year after winning the World Series.
METS 5, MARLINS 2: Jay Bruce and former Ray James Loney homered for visiting New York, which boosted its NL wild-card chances and eliminated Miami from playoff contention.
PIRATES 8, CUBS 4: Former Ray John Jaso hit for the first cycle in the history of PNC Park for host Pittsburgh.
D'BACKS 3, NATIONALS 0 (5): Shelby Miller pitched five shutout innings and Jean Segura had three hits to reach 200 for the season for visiting Arizona in a rain-shortened game.
Around the league
ROSE'S APPEAL: Pete Rose is appealing directly to the Hall of Fame to restore his eligibility, arguing the lifetime ban he agreed to in 1989 was never intended to keep him out of Cooperstown. A seven-page letter to Hall president Jeff Idelson argues the settlement agreement reached by Rose and then-commissioner Bart Giamatti didn't include a provision that he be ineligible for election.
BRAVES: First baseman Freddie Freeman extended his hitting streak to 30 games, the longest in the majors this season.
CUBS: President of baseball operations Theo Epstein agreed to a five-year extension, a reward for an overhaul that has the franchise eyeing its first championship since 1908.