Luis Arraez had two hits and drove in three runs, including a go-ahead RBI groundout in the 10th, and the surging San Diego Padres rallied from a 7-3 deficit to beat the host Miami Marlins 9-8 on Saturday.

David Peralta singled twice and doubled for the Padres, who won their seventh in a row and for the 16th time in their last 18 games.

Ha-Seong Kim drew a leadoff walk against John McMillon to start the winning rally. Kyle Higashioka’s sacrifice bunt advanced Kim and automatic runner Tyler Wade before Luis Arraez hit a soft grounder to first baseman Jonah Bride that scored Wade.

Miami’s Derek Hill reached on a leadoff bunt single against reliever Tanner Scott in the bottom of the 10th, advancing automatic runner Vidal Bruján to third. After Cristian Pache popped out, Xavier Edwards hit a grounder to third baseman Manny Machado, who threw Bruján out at home. Scott struck out Jake Burger for his 19th save.

Jackson Merrill’s two-run homer in the eighth tied it at 7-all.

Peralta followed with a double and Kim’s sacrifice bunt advanced pinch runner Bryce Johnson to third. Arraez’s two-out infield single scored Johnson to put the Padres ahead.

Miami tied it in the bottom half on Burger’s solo homer, his 21st and 11th since the All-Star break.

GIANTS 3, TIGERS 1 >> Brett Wisely hit a two-run double in the fifth inning and San Francisco defeated visiting Detroit.

After being held without a hit for four innings by Detroit’s Alex Faedo and Brant Hurter (0-1), the Giants opened the fifth with consecutive singles by Mike Yastrzemski and Jerar Encarnacion before Wisely drove in two runs with a double down the right-field line. Heliot Ramos followed with an RBI single.

Logan Webb (10-8) tossed seven sharp innings and won his third straight start. Webb allowed one run on four hits and a walk while striking out eight.

Ryan Walker earned the save in his first opportunity since the Giants demoted closer Camilo Doval to Triple-A Sacramento.

The win pushed San Francisco to a season-best three games over .500.

DIAMONDBACKS 11, PHILLIES 1 >> Jake McCarthy hit a pair of two-homers, Ketel Marte got his 30th home run of the season before leaving with a left ankle contusion and Arizona routed visiting Philadelphia.

Corbin Carroll also homered for Arizona, which has won 14 of its last 17 to move into a wild-card spot.

Diamondbacks starter Zac Gallen also departed early after moving awkwardly in attempting to field a ground ball in the fifth.

Phillies starter Aaron Nola (11-6) went five innings, allowing nine hits and four runs — three earned. He walked three.

ORIOLES 7, RAYS 5 >> Ramón Urías hit a go-ahead homer in the eighth, Ryan Mountcastle drove in three runs and AL East-leading Baltimore beat host Tampa Bay.

Baltimore took a one-game lead over the Yankees in the division. The Orioles are 8-1 against the Rays this season.

Baltimore raced to a 4-0 lead after two inning, but squandered that advantage. Urías hit a two-run homer off Colin Poche (1-2) in a three-run eighth that put the Orioles up 7-4. Poche left after Mountcastle’s RBI single went off his leg.

GUARDIANS 2, TWINS 1 >> Steven Kwan homered on the second pitch of the game and Bo Naylor also went deep for Cleveland in a road victory over Minnesota that stopped a season-long seven-game losing streak.

Gavin Williams (2-4) gave the Guardians six strong innings, allowing one run on four hits and no walks.

RANGERS 0-9, YANKEES 8-3 >> Corey Seager homered and rookie Cody Bradford pitched five strong innings as Texas beat New York to earn a doubleheader split at Yankee Stadium.

Adolis García finished the doubleheader with five hits and an RBI as the Rangers snapped a three-game skid.

In the opener, Carlos Rodón scattered three hits over 5 2/3 innings and Austin Wells drove in four runs in the shutout win. Aaron Judge drove in his MLB-leading 105th run and reached base four times.

Giancarlo Stanton and Jazz Chisolm Jr. homered in the second game for New York.

Seager’s 25th homer of the season highlighted a five-run sixth inning.

In game one, New York chased Texas starter Nathan Eovaldi (8-6) after three innings when the right-hander was pulled for precautionary reasons with tightness in his right side.

Rodón (13-7) yielded three hits, walked five and struck out six.

BRAVES 11, ROCKIES 8 >> Matt Olson had two homers and a career-high six RBIs, Marcell Ozuna and Jorge Soler also homered, and Atlanta broke a six-game losing streak with a victory at Colorado.

Olson hit a two-run homer off Angel Chivilli (0-1) to break an 8-8 tie in the seventh inning and Soler added a solo shot in the eighth to help the Braves avoid their longest losing streak in nearly eight years (Aug. 13-20, 2016).

Sam Hilliard had a homer, two doubles and five RBIs for the Rockies, who have lost 10 of the last 11 against the Braves at Coors Field.

BREWERS 1, REDS 0 >> Rhys Hoskins hit a 405-foot home run in the eighth inning to lift host Milwaukee over Cincinnati for its fifth win in a row.

Hoskins’ 20th homer came off reliever Tony Santillan (0-1).

Brewers rookie Tobias Myers gave up three hits over 7 1/3 innings and struck out nine batters.

ASTROS 5, RED SOX 4 >> Yordan Alvarez belted two home runs and drove in three runs, rookie right-hander Spencer Arrighetti struck out a season-high 13 over seven innings and Houston won at Boston.

Zach Dezenzo hit his first major league homer and Alex Bregman added a solo shot for the AL West-leading Astros, who won their fourth in a row.

Danny Jansen and Masataka Yoshida each had a solo homer for the Red Sox.

Arrighetti (5-10) gave up just two hits — the solo homers — and walked one.