PHOENIX - Pinch-hitter Tyler Goeddel hit a sacrifice fly in the 10th inning and the Philadelphia Phillies completed their first sweep at Chase Field in 10 years with a 9-8 win over the Arizona Diamondbacks on Wednesday.

The Diamondbacks went up 7-4 in the seventh inning on Paul Goldschmidt's two-run double, but the Phillies rallied with four runs in the eighth to go up 8-7.

Jean Segura tied it in the bottom half on an infield single, but the Diamondbacks allowed Jeanmar Gomez (3-2) to escape a jam in the ninth.

Peter Bourjos, who earlier had a two-run homer, hit a two-out single off Silvino Bracho (0-2) in the 10th and moved to third on Cody Asche's single. Goeddel followed with a line drive to right for the go-ahead run.

Brett Oberholtzer worked around a single in the 10th for his first save.

YANKEES 9, RANGERS 7

NEW YORK - Brian McCann hit a tying, three-run homer off Sam Dyson, Didi Gregorius capped a six-run ninth inning with his two-run shot and the New York Yankees rallied past Texas.

Down 7-2 and in danger of falling 10 games behind AL East-leading Baltimore, the Yankees began their comeback when McCann homered off Cesar Ramos in the eighth.

Rob Refsnyder singled off Matt Bush leading off the ninth, Jacoby Ellsbury singled and Dyson (1-2) relieved.

Brett Gardner singled and Refsnyder came home when centre fielder Ian Desmond bobbled the ball for an error. After Alex Rodriguez lined out, McCann homered into the right-field bleachers, Starlin Castro walked and Gregorius lined the ball into the right-field seats for his first career game-ending homer.

Luis Cessa (1-0) allowed one run in three innings for his first big league win.

CUBS 9, REDS 2

CINCINNATI - Anthony Rizzo legged out his first inside-the-park homer - another unusual moment in a series full of oddities - and Chicago finished a three-game sweep to get back on solid footing after a rough week.

The Cubs went 1-6 last week, hurt by an injury-depleted lineup and a balky bullpen. With thousands of Cubs fans in the stands at Great American Ball Park for each game, they pulled off an invigorating sweep.

Rizzo drove in three runs in the first inning off left-hander Cody Reed (0-2) with the Cubs' first inside-the-park homer since 2011, when Tony Campana circled the bases against Cincinnati. Left fielder Adam Duvall cut in front of centre fielder Billy Hamilton but couldn't get to the ball, which deflected off Hamilton's face. He was examined and left the game.

Kyle Hendricks (6-6) gave up Duvall's 22nd homer and went 6 2/3 innings. He also drove in a run with a squeeze bunt.

ASTROS 10, ANGELS 4

ANAHEIM, Calif. - Jose Altuve went 4 for 5 and scored four runs to help Houston complete a three-game sweep.

It was the second time Houston has swept Los Angeles in the last two weeks. The Astros finished the six games with 37 runs. It was also Houston's eighth straight win over their AL West rivals, extending the longest winning streak against Los Angeles in franchise history.

Houston has gone 35-20 since May 1, the third-best mark in the AL in that span.

Altuve, who extended his career-high on-base streak to 32 games, was a home run shy of the cycle and finished the series 8 for 14 with two RBIs and six runs.

Dallas Keuchel (5-9) limited the Angels to three runs and six hits over six innings to win his second straight decision.

Jered Weaver (6-7) pitched into the sixth inning but left after giving up a one-out solo home run to George Springer.

NATIONALS 4, METS 2

WASHINGTON - Daniel Murphy homered twice, tormenting his former team yet again, and Washington completed a three-game sweep of the New York Mets.

Max Scherzer (9-5) cruised against New York's sputtering offence, allowing two hits with 10 strikeouts over 7 1/3 innings. He retired 18 in a row before Brandon Nimmo's single in the eighth and finished with at least 10 strikeouts for the fourth straight game.

Murphy homered off Logan Verrett (3-5) in the second for a 1-0 lead and golfed a two-run drive in the eighth. He matched his career high with 14 homers and helped Washington win its fourth in a row.

The Mets went 23 innings without scoring before James Loney's two-run homer in the ninth off Shawn Kelley.

RAYS 4, RED SOX 0

ST. PETERSBURG, Fla. - Matt Moore pitched seven spotless innings and Brandon Guyer homered and drove in two runs in his return from a three-week stint on the disabled list to lead Tampa Bay.

Moore (4-5) allowed three singles, walked two and struck out five to outpitch David Price (8-5), the former Rays ace who fell to 1-3 in five career starts against his old team.

Guyer, who missed 23 games with a left hamstring strain, led off the second inning with his seventh homer. He doubled down the left-field line to make it 4-1 in the third.

Moore, meanwhile, held the Red Sox hitless until Christian Vazquez singled leading off the sixth. Mookie Betts and Xander Bogaerts followed with hits to load the bases with one out, but David Ortiz popped up and Hanley Ramirez hit a routine fly that ended the threat.

ROYALS 3, CARDINALS 2, 12 INNINGS

ST. LOUIS - Alcides Escobar hit a go-ahead RBI double just inside the right-field line in the 12th inning and Kansas City outlasted St. Louis.

Escobar drove in the first run of the game with a bases-loaded sacrifice fly in the eighth. His fly to shallow right off Seth Maness (0-2) fell just in front of Stephen Piscotty, whose homer leading off the 10th tied it at 2.

Chien-Ming Wang (5-0) worked two scoreless innings for Kansas City, which survived blown saves by Wade Davis and Joakim Soria, stranded 19 runners and used all of its bench players. The Royals are 39-50 in the I-70 interleague series but 14-12 at 11-year-old Busch Stadium.

Whit Merrifield put Kansas City ahead in the 10th when a potential double-play grounder was booted by second baseman Matt Carpenter and Merrifield got an RBI. He also doubled with one out in the 12th.

BLUE JAYS 5, ROCKIES 3

DENVER - Aaron Sanchez allowed one run in eight innings and Josh Donaldson homered to lead Toronto.

Sanchez (8-1) allowed six hits, struck out three and walked two in extending his unbeaten streak to 12 games.

The Blue Jays won their first series ever in Denver and their first overall since June 13-16, against the Philadelphia Phillies.

Roberto Osuna gave up RBI doubles to Mark Reynolds and Daniel Descalso and put the tying run in scoring position with one out in the ninth. He hit Charlie Blackmon to load the bases before he struck out Cristhian Adames to end the game.

Tyler Anderson (0-2) allowed the homer to Donaldson with two outs in the third inning and an RBI single to Troy Tulowitzki two batters later to give Toronto a 3-0 lead.

ORIOLES 12, PADRES 6

SAN DIEGO - Mark Trumbo hit his major league-leading 23rd homer and drove in four runs as AL East-leading Baltimore won its seventh straight.

The Orioles tied the 1996 Oakland A's for the most homers in June, 55. Overall, the Orioles lead the majors with 124.

The Orioles hit four home runs in sweeping the two-game series, including three in Tuesday night's 11-7 win.

Trumbo hit a two-run homer in the fourth inning and a two-run double in the ninth. Manny Machado had two hits and three RBIs, and pitcher Yovani Gallardo (3-1) singled twice and scored a run.

Christian Friedrich (4-3) allowed six runs, four earned, and five hits in five innings.

TIGERS 10, MARLINS 3

DETROIT - Miguel Cabrera hit one of Detroit's three homers to lead the Tigers past Miami.

Cabrera hit his 18th homer of the season in the fourth inning, tying Billy Williams at No. 48 on baseball's career list with 426.

Steven Moya and Jarrod Saltalamacchia cleared the fence in consecutive at-bats in the fifth, giving Detroit an 8-2 lead.

Marlins reliever Dustin McGowan gave up all three homers, matching a career high.

The Tigers built a cushion right away with a four-run first, getting two runs on Victor Martinez's single off Tom Koehler.

Daniel Norris (1-0) struck out a career-high eight and gave up two runs on eight hits and a walk over five innings.

Koehler (6-7) allowed five runs and eight hits in three innings.

INDIANS 3, BRAVES 0

ATLANTA - Danny Salazar threw seven innings, Lonnie Chisenhall hit his second homer of the series and Cleveland won its 12th straight.

Cleveland swept its fourth straight series to extend the majors' longest winning streak this season.

The Indians need one more win to match the longest winning streaks in franchise history. They won 13 straight in 1942 and 1951. They had another 12-game streak in 1922.

Jason Kipnis broke a scoreless tie with a two-run single in the fifth.

Salazar (10-3) was dominant, allowing five hits with no walks and eight strikeouts. He lowered the AL's second-best ERA to 2.22 while winning his sixth straight start.

Braves right-hander Joel De La Cruz (0-1), recalled from Triple-A Gwinnett for his major league debut, allowed three runs in six innings.

BREWERS 7, DODGERS 0

MILWAUKEE - Junior Guerra allowed two hits over eight innings, Ryan Braun hit a two-run homer and a two-run double and Kirk Nieuwenhuis hit a two-run shot to help Milwaukee spoil Brock Stewart's major league debut.

Braun's two-run homer off Chris Hatcher in the seventh inning gave Guerra some extra cushion, but the 31-year-old rookie right-hander didn't need it.

Guerra (5-1) allowed Corey Seager's double in the first and Yasiel Puig's single in the fifth. After he walked Adrian Gonzalez in the first, Guerra retired 21 of the next 23 batters, striking out seven.

Guerra received a no-decision at Dodger Stadium on June 16 in his previous start against the Dodgers. He allowed five runs and five hits over 5 1/3 innings then.

Stewart (0-1) retired the side in order in the first, but the Brewers scored five times on six hits in the second. The 24-year-old right-hander regrouped and held the Brewers scoreless for the next three innings. He struck out seven and walked two, throwing 95 pitches.

WHITE SOX 9, TWINS 6

CHICAGO - James Shields broke out of a slump with 6 2/3 innings against one of baseball's worst lineups, helping Chicago beat Minnesota.

Shields (3-9) allowed one run and eight hits in his first win since he tossed seven scoreless innings for San Diego at Milwaukee on May 12. The right-hander got hit hard after he was acquired by Chicago in a trade June 4, going 0-2 with a 15.80 ERA in his first four starts.

Todd Frazier, Brett Lawrie and Tyler Saladino homered for the White Sox, who improved to 7-1 against the Twins after losing 4-0 in the series opener on Tuesday. Saladino and Tim Anderson each had two hits and two RBIs.

Ricky Nolasco (3-6) was charged with seven runs and nine hits in 5 2/3 innings in his second straight loss.

Nate Jones got one out for his second save.

ATHLETICS 7, GIANTS 1

OAKLAND, Calif. - Jed Lowrie and Yonder Alonso each hit two-run homers and Oakland took advantage of San Francisco's sloppy play to win its third straight game in the Bay Bridge series.

Sean Manaea (3-4) pitched 5 2/3 scoreless innings and Billy Burns drove in two runs for the A's, who have won six of seven and will go for a sweep in the two-city series against their cross-bay rivals on Thursday night.

The Giants committed three errors that led to four unearned runs and botched a few other plays in the field that left starting pitcher Jake Peavy (4-7) fuming on the mound. Peavy allowed seven runs - three earned - and five hits in 3 1/3 innings, but could have had a better fate with more support from his fielders.

PIRATES 8, MARINERS 1

SEATTLE - Sean Rodriguez doubled in consecutive at-bats and drove in four runs, David Freese hit a solo home run and Pittsburgh beat Seattle.

Rodriguez was responsible for breaking the game open in the fifth inning with a three-run double into the left-field corner off Seattle reliever Donn Roach. Rodriguez doubled an inning earlier off starter Wade Miley (6-4) to score Starling Marte.

Freese got it all started with a solo home run on the first pitch of the second inning. It was a three-run inning for Pittsburgh, capped by a two-run double from Josh Harrison.

All that offence backed a strong start from rookie right-hander Jameson Taillon (2-1), who pitched six innings, giving up just one run and six hits.