Deven Marrero belted the go-ahead run with two outs in the 11th inning as the Boston Red Sox prevented the New York Yankees from clinching a Major League Baseball playoff spot.
Japanese pitcher Masahiro Tanaka returned from a strained right hamstring and allowed a three-run home run to Boston's Travis Shaw in the first and a RBI single to David Ortiz in the third inning of the 9-5 loss.
The Red Sox had runners on first and third when third baseman Marrero smacked a single up the middle on the first pitch he faced from Andrew Bailey. After Bailey was replaced by struggling left-hander Chasen Shreve, outfielder Jackie Bradley drove in a run with a sacrifice bunt.
Centre fielder Mookie Betts followed with a two-run homer, four innings after he blasted a game-tying homer off Dellin Betances.
Because the Minnesota Twins and the Los Angeles Angels had lost their games earlier in the day, the Yankees merely had to win to lock up their first playoff berth in three years but they failed to do so.
New York now needs to win two games to clinch home-field advantage for the American League wild-card game.