AMERICAN LEAGUE: Red Sox 4, Rangers 2

Chris Sale struck out 12 in seven innings of shutout ball in his final start before the All-Star Game, and major-league-batting leader Mookie Betts had two more hits Wednesday night as host Boston beat Texas for its ninth straight victory.

Sale (10-4) allowed six hits and walked one to win his fifth straight decision and move the Red Sox 36 games above .500 for the first time since Bucky Dent homered into the net above the Green Monster in a one-game playoff to settle the 1978 AL East title.

Elvis Andrus had three hits for the Rangers, who struck out 18 times to lose for the fifth time in six games. Bartolo Colon (5-7) allowed four runs — three earned — on nine hits and two walks, striking out three in six innings.

J.D. Martinez had two RBI to pad his major-league-leading total of 79.

Yankees 9, Orioles 0

Greg Bird hit his first career grand slam, Sonny Gray had a dominating performance and New York beat host Baltimore for a split of the four-game series.

Rookie Tyler Wade and Austin Romine also homered for the Yankees, and Giancarlo Stanton had four hits.

Facing Dylan Bundy (6-9) in the third inning, Bird launched a drive off the right-field foul pole to put New York up 5-0. It was the second night in a row he homered and had four RBI.

Gray (6-7) allowed three hits, walked one and struck out eight over six innings. The right-hander had lost three straight starts, the last two in which he gave up a collective 11 runs over 4⅓ innings.

Facing the last-place Orioles couldn’t have come at a better time for Gray. He’s 3-0 with a 2.00 ERA against Baltimore and 3-7 with a 6.32 ERA against everyone else.

Rays 4, Tigers 2

C.J. Cron hit a three-run homer in the seventh inning as host Tampa Bay beat Detroit for its fifth straight win.

Cron’s 18th homer came off Jordan Zimmermann after singles by Kevin Kiermaier and Matt Duffy.

Cron and Kiermaier each had three hits for the Rays, who have won 14 of 18. It was only the second multiple-hit game of the season for Kiermaier, who drove in the game’s first run with his second homer of the season in the third inning.

James McCann’s two-run homer off Matt Andriese in the fourth had given Detroit a 2-1 lead that lasted until Cron’s homer. It was McCann’s sixth homer of the season.

The Tigers, who struck out 14 times against five Tampa Bay pitchers, have lost four straight and 18 of 22.

Rookie left-hander Ryan Yarbrough (8-4) got the win after giving up one hit in three innings of relief. Sergio Romo pitched the ninth for his 11th save in 16 opportunities.

Twins 8, Royals 5

Brian Dozier hit a two-run home run, going deep for the second straight game, as host Minnesota beat Kansas City.

Lance Lynn (7-7) recovered from a three-run homer by Salvador Perez in the first inning to win his second straight start for the Twins, who used the bottom third of their lineup to launch rallies in the second and the fourth against Royals starter Burch Smith (0-1).

Max Kepler, Jake Cave and Bobby Wilson went 6-for-11 with five runs scored. Wilson, whose batting average fell to .114 last week, had two RBI and was one of three Twins with three hits, joining Dozier and Joe Mauer. Wilson, the backup catcher, is hitting .169.

Mike Moustakas homered twice for the Royals, who have the fewest home runs in MLB, but took the Twins deep five times over the last two games of this series.

NATIONAL LEAGUE: Pirates 2, Nationals 0

Starling Marte hit a two-run homer and Trevor Williams combined with four relievers on a five-hitter as host Pittsburgh beat Washington.

Marte homered to center field with two outs in the third off Gio Gonzalez after Jordy Mercer led off the inning with the first of his two doubles. That was enough to give the Pirates just their third win in nine games.

Williams (7-7) won for just the second time in his past 10 starts, giving up four hits with three strikeouts and three walks. He is 2-5 with a 6.26 ERA in that span after going 5-2 with a 2.72 ERA in his first nine outings.

Gonzalez (6-6) remained winless since May 28 despite allowing just two runs, six hits and one walk while striking out four. The left-hander is 0-4 in his past eight starts.

Giants 5, Cubs 4 (13)

Buster Posey singled off the right-field wall in the 13th inning for his fifth career game-ending hit, sending host San Francisco past Chicago.

Brandon Belt drew a two-out walk from James Norwood (0-1). Andrew McCutchen then singled to bring up Posey, who ended the four-hour, 30-minute game with the Giants’ first run since scoring four in the first.

Dereck Rodriguez (4-1) pitched three scoreless innings for the win. He also had three of San Francisco’s 16 strikeouts.

Norwood worked the 12th and 13th in his major-league debut. He immediately struck out Brandon Crawford on a 99 mph fastball.

Cubs slugger Kris Bryant hit a two-run homer in his return from the disabled list, and All-Star Javier Baez tied the game with a solo homer to start the seventh.

Tony Watson’s scoreless streak at home ended at 20⅔ innings with Baez’s 18th homer.

Mets 3, Phillies 0 (10)

Pinch-hitter Brandon Nimmo launched a three-run homer in the bottom of the 10th inning and host New York got another dominant outing from All-Star Jacob deGrom to beat Philadelphia.

Amed Rosario, who had two of the Mets’ four hits, began the winning rally with a two-out double off Mark Leiter Jr. (0-1) — the first hit for the Mets since the fourth inning. Jose Reyes walked and Nimmo drove Leiter’s next pitch well over the wall in right-center for his first career walk-off RBI.

It was New York’s third game-ending homer in the last six days. Jose Bautista beat Tampa Bay with a grand slam last Friday, and Wilmer Flores connected Monday in the series opener against Philadelphia to help the Mets earn a four-game split.

In his final scheduled start before heading to the All-Star Game next Tuesday in Washington, deGrom scattered five hits and matched his longest outing of the season. He struck out seven and lowered his major league-leading ERA to 1.68.

INTERLEAGUE: Braves 9, Blue Jays 5

Ozzie Albies had two homers and host Atlanta beat Toronto to move back into a tie for the NL East lead.

Mike Foltynewicz (7-5) and the Braves led 7-0 before Toronto scored five runs in the seventh on Justin Smoak’s leadoff homer and a grand slam by Devon Travis. But Albies hit a two-run shot in the eighth to help Atlanta hold on for just its second win in eight games.

Coupled with Philadelphia’s loss to the New York Mets, the Braves moved into a tie with the Phillies for the division lead.

Albies, headed to his first All-Star game next week, led off the sixth with a drive off Luis Santos that ended Atlanta’s season-long stretch of five games without a homer. He also had a sacrifice fly in the Braves’ six-run second.

Foltynewicz allowed only one hit through six scoreless innings before giving up Smoak’s 14th homer high into the right-field seats to open the seventh.