BOSTON (AP) " Hanley Ramirez hit a three-run homer with two outs in the ninth inning to finish off a five-run rally as the Boston Red Sox came back to beat the New York Yankees 7-5 on Thursday night and open a two-game lead in the American League East.
New York took a four-run lead after three innings and still led 5-1 when David Ortiz hit a solo homer in the eighth, the 537th of his career, passing Yankees Hall of Famer Mickey Mantle for 17th on baseball's all-time list. Ortiz also had an RBI single off Dellin Betances (3-6) in the ninth.
There were still two on and two outs when Ramirez worked a 3-1 count and then sent the next pitch to straightaway center field. The victory in the opener of the four-game series against its archrival snapped Boston's two-game losing streak.
RAYS 7, ORIOLES 6
BALTIMORE (AP) " Evan Longoria homered and drove in five runs as the last-place Tampa Bay Rays again played the spoiler's role in a victory over the Baltimore Orioles.
The loss stalled the Orioles' bid to enhance their position in the playoff picture. Baltimore started the day trailing AL East-leading Boston by one game and holding a one-game lead over Toronto for the top wild-card spot.
Tampa Bay has won three straight, including the last two of a three-game series in Toronto.
Longoria hit his career high-tying 33rd homer with two on in the first inning and added a two-run single in the fourth to increase his team-high RBI total to 91.
Brad Boxberger (4-1) got the last two outs in the fifth to pick up the win. Alex Colome worked the ninth for his 33rd save.
Yovani Gallardo (5-8) gave up six runs and seven hits in 3 1/3 innings.
BREWERS 5, CUBS 4
CHICAGO (AP) " Scooter Gennett hit a tiebreaking, two-run double in the seventh inning to help the Milwaukee Brewers spoil the Chicago Cubs' first opportunity to clinch the NL Central title with this victory.
Chicago (93-53) was hoping to begin a 10-game homestand with a boozy celebration of its first division title since 2008. But Keon Broxton homered and Orlando Arcia drove in two runs for Milwaukee, making the Cubs wait for the result of St. Louis' game at San Francisco to find out if their season-long dominance of the Central was complete.
The crowd of 41,362 cheered loudly when Hunter Pence's two-run homer in the first inning against the Cardinals was shown on the video board in left field.
TWINS 5, TIGERS 1
DETROIT (AP) " Brian Dozier's two-run single highlighted a four-run second inning as the Minnesota Twins handed the Detroit Tigers a crucial loss by beating them 5-1.
The Tigers split four games with lowly Minnesota, hurting them in the crowded AL wild-card race. Detroit came into the series with a 10-2 record against the Twins.
Hector Santiago (12-8) got the win, holding the Tigers to one run in 5 2/3 innings.
Mike Pelfrey (4-10) lost in his first major league appearance since July 31. He started the game with a 60-pitch limit but lasted only 36, giving up four runs and five hits in 1 2/3 innings.
WHITE SOX 2, INDIANS 1
CHICAGO (AP) " Jose Abreu extended his hitting streak with a home run and a single, and Carlos Sanchez singled home the winning run in the ninth inning to lift Chicago over Cleveland.
The White Sox took three of four games in the series to conclude a 6-4 homestand against three playoff hopefuls. The first-place Indians remained six games ahead of Detroit in the AL Central.
David Robertson (5-3) pitched a scoreless inning for the win. Chicago starter James Shields gave up one run and three hits in six innings but remained winless in his last nine starts. He was 0-5 with a 10.75 ERA in his previous eight appearances.
Bryan Shaw (2-5) took the loss.
PIRATES 15, PHILLIES 2
PHILADELPHIA (AP) " Andrew McCutchen hit two solo homers, Chad Kuhl pitched six effective innings as the Pittsburgh Pirates easily beat the Philadelphia Phillies.
Jordy Mercer hit a three-run homer and John Jaso and Sean Rodriguez also went deep to help the Pirates split a four-game series.
Kuhl (4-3) allowed two runs and four hits, striking out five. He retired the first 12 batters before Tommy Joseph lined a double to right-center in the fifth.
Jerad Eickhoff (10-14) gave up six runs " three earned " and five hits (four homers) in 6 2/3 innings.
The Pirates had seven hits and eight runs in the ninth to put the game way out of reach.
This story has been automatically published from the Associated Press wire which uses US spellings