NEW YORK (AP) -- J.D. Martinez hit a tiebreaking home run against Dellin Betances (1-2) leading off the eighth inning, just beyond Aaron Judge's reach at the right-field wall, and the Boston Red Sox rebounded after wasting a four-run lead to beat New York 5-4 Thursday night and send the Yankees to only their second loss in 19 games.
In another dramatic game before a sellout crowd, Boston moved back into a tie with the Yankees for the AL East lead at 26-11, the best record in the major leagues. The rivals don't meet again until June 29 in the Bronx.
Boston built a 4-0 lead against CC Sabathia as Hanley Ramirez drove in three runs with an RBI groundout in the first, an RBI single in a two-run third and a solo homer in the fifth just before a 55-minute rain delay. But the Yankees tied the score in the seventh.
Joe Kelly (2-0) got the win and Craig Kimbrel closed for his 10th save in 12 chances.
Mookie Betts had three hits, raising his batting average to a major league-leading .361.
New York had won eight straight games overall and 11 in a row at home.
MARINERS 9, BLUE JAYS 3
TORONTO (AP) -- Kyle Seager hit two home runs, including his fourth career grand slam, and Jean Segura had four hits as Seattle beat Toronto.
Mike Leake (4-3) allowed two runs and six hits in seven innings.
Seager hit a two-out grand slam off left-hander J.A. Happ (4-3) in the first and a leadoff shot against Jake Petricka in the fifth, his seventh career multihomer game.
Seager also turned in a great defensive play at third base, a sliding catch in foul territory to retire Yangervis Solarte.
Ryon Healy and Mike Zunino added solo home runs for the Mariners, who had 17 hits to match their season high for a nine-inning game.
Russell Martin hit a two-run homer but the Blue Jays lost for sixth time in eight home games.
PHILLIES 6, GIANTS 3
PHILADELPHIA (AP) -- Vince Velasquez recovered from a slow start to strike out 12 in six innings, Carlos Santana hit a three-run homer and Philadelphia rallied past the San Francisco for a four-game sweep.
Odubel Herrera added three hits and drove in two runs, extending his on-base streak to 39 games for the Phillies, who improved to 15-5 at home.
Gregor Blanco and Alen Hanson homered to give the Giants a 3-0 lead in the second inning before Velasquez (3-4) began a string of five straight strikeouts. The right-hander allowed five hits and helped the Giants set a dubious mark.
Santana, batting .153 entering May, continued his recent tear when he connected off Ty Blach (3-4) in a four-run fourth.
BRAVES 9, MARLINS 2
MIAMI (AP) -- Ozzie Albies hit Atlanta's first grand slam of the season to highlight a seven-run sixth inning, Freddie Freeman had a career-high five hits and the NL East-leading Braves beat Miami.
Freeman also homered for the Braves in that sixth-inning outburst, when Atlanta got all of its runs with two out. Albies also had a run-scoring single in the ninth to cap his five-RBI night.
The Braves have won eight straight games on the road, outscoring opponents 50-8 in that span. Atlanta starter Mike Foltynewicz (3-2) gave up three hits and one unearned run in five innings, and Luiz Gohara got a three-inning save.
Marlins starter Caleb Smith (2-4) went 5 1/3 innings, allowing two runs on seven hits and striking out five.
ORIOLES 11, ROYALS 6
BALTIMORE (AP) -- Adam Jones homered, scored three runs and had three RBIs, and Baltimore outslugged Kansas City to emerge with its second winning streak of the season.
Manny Machado and Trey Mancini also went deep for the Orioles, who trailed 4-0 in the first inning and 6-3 in the second before rallying to beat the Royals for the second night in a row. The only other time Baltimore (10-27) won successive games this season was April 5-6 at Yankee Stadium.
Miguel Castro (1-1) replaced ineffective starter Chris Tillman and blanked Kansas City over 4 2/3 innings, his longest outing of the season.
BREWERS 5, ROCKIES 2
DENVER (AP) -- Lorenzo Cain homered on the first pitch of the game, Jhoulys Chacin kept his former team in check into the sixth inning and Milwaukee beat Colorado.
Cain lined a fastball from German Marquez (2-4) to deep center for his second career leadoff homer. The Milwaukee outfielder also accomplished feat on June 25, 2014, as a member of the Kansas City Royals.
Chacin (3-1) cruised along in the place where he kicked off his career, allowing two runs over 5 1/3 innings. Jeremy Jeffress struck out the side in the ninth for his third save in four chances.