Geraldo Perdomo’s bases-loaded triple tied the game and Josh Naylor’s infield hit scored Perdomo with the winning run as the Arizona Diamondbacks scored five times in the bottom of the ninth to shock the San Diego Padres 8-7 on Saturday night.

It was 7-3 going to the ninth. Pavin Smith, Gabriel Moreno and Alek Thomas singled against Padres closer Robert Suárez (1-2), working in a non-save situation.

Ketel Marte beat out an infield hit to score a run and set the stage for Perdomo, who lined one into the right-field corner to score all three runs. Adrian Morejon relieved and Naylor, on the first pitch, hit a grounder to first but Perdomo beat the throw home.

The Padres scored four in the seventh to take a 5-3 lead on Fernando Tatis Jr.’s bases-loaded single and Manny Machado’s two-run double off Ryan Thompson, who had relieved starter Zac Gallen.

Eugenio Suárez’s three-run homer in the fifth off Ryan Bergert put the Diamondbacks ahead 3-1.

Red Sox 4, Yankees 3: Hunter Dobbins pitched six shutout innings to beat New York for the second time in a week, and host Boston won its fourth straight game.

Dobbins (4-1) struck out five and gave up two singles.

Dobbins earned the win against the Yankees last Sunday when he worked five innings and allowed three runs, two on a first-inning, two-run homer by Aaron Judge.

Judge went 0 for 4 with three strikeouts on Saturday.

Carlos Rodón (8-5), who entered 7-1 with a 1.90 ERA in his previous 10 starts, gave up four runs (three earned) on seven hits in five-plus innings.

Cubs 2, Pirates 1: Dansby Swanson homered, Matthew Boyd pitched six sharp innings and Chicago edged Pittsburgh at Wrigley Field.

Swanson connected against Ryan Borucki (1-3) with two out in the sixth inning, giving Chicago a 2-1 lead with a solo drive into the bleachers in left-center.

Andrew McCutchen went deep for last-place Pittsburgh, which had won six of eight. It was McCutchen’s 18th homer at Wrigley Field, tops for a visitor to the iconic ballpark among active players.

Boyd (6-3) retired 14 in a row after McCutchen connected with one out in the first. The left-hander, who signed a $29 million, two-year deal with Chicago in free agency, improved to 6-0 with a 2.25 ERA in six home starts this year.

Phillies 3, Blue Jays 2: Max Kepler hit a tiebreaking home run in the eighth inning off Chad Green to lift Philadelphia to a home victory over Toronto.

Cristopher Sánchez pitched seven strong innings for the Phillies, who managed just four hits while winning their fourth in the last five.

Reds 11, Tigers 1: Tyler Stephenson hit a grand slam in a six-run fifth and visiting Cincinnati routed Detroit.

Elly De La Cruz, Spencer Steer and Matt McLain also homered for the Reds, who had been outscored 22-7 in the previous two games.

Brady Singer (7-4) got the win, giving up one run on four hits in six innings.

Jack Flaherty (5-7) allowed seven runs on five hits — including three homers — and five walks in 4 2/3 innings.

The Tigers tied the game in the bottom of the inning on Wenceel Pérez’s RBI single, but the Reds answered with six runs in a 10-batter fifth.

Jake Fraley started the inning with a single, took second on TJ Friedl’s walk and scored on Gavin Lux’s single. Flaherty then walked De La Cruz, loading the bases, and Stephenson hit his next pitch for his second career grand slam.

Steer ended Flaherty’s game with another homer.

Astros 3, Twins 2: Rookie Cam Smith hit a tiebreaking RBI single off Jhoan Duran with two outs in bottom of the ninth to give the Houston a victory over Minnesota.

Both teams got strong performances from their starters. Houston’s Hunter Brown allowed three hits and two runs with 12 strikeouts in seven innings. Minnesota’s Joe Ryan yielded two hits and two runs while fanning seven in seven innings.

Yainer Diaz hit a two-run homer for Houston in the third and Brooks Lee tied it with his shot in the fifth.

Braves 4, Rockies 1: Spencer Strider recorded 13 strikeouts in his first win of the season, Ronald Acuña Jr. stayed hot with two hits, including a two-run homer, and Atlanta won at home over Colorado.

The loss left the Rockies with the worst record through 70 games in the modern era. Colorado (13-57) surpassed the 1932 Boston Red Sox, who were 14-56.

The Braves have won con- secutive series after falling 10 games under .500 while losing six straight series.

Strider (1-5) was dominant in his sixth start since being activated from the injured list on May 19. He allowed three hits with one walk in six innings.

Rays 8, Mets 4: Taylor Walls and Yandy Díaz had two hits and two RBIs apiece and Tampa Bay remained hot with a win at New York.

Junior Caminero homered to lead off a five-run fourth for the Rays, who have won eight of their last 11 games and lead the majors with a 17-6 record and 134 runs scored since May 20.

Brandon Nimmo had three hits and two RBIs for the Mets, who lost consecutive games for the first time since a three-game skid from May 18-20.

Athletics 4, Royals 0: Jacob Lopez became the latest pitcher to shut down the Royals with six innings of three-hit ball, Max Muncy and Lawrence Butler hit homers, and the visiting Athletics beat Kansas City.

Lopez (1-4) walked one and struck out nine while winning for the second time in his big league career.

He was recalled from Triple-A Las Vegas last month and had been 0-3 with a 6.88 ERA in three games.

Michael Kelly pitched two perfect innings in relief and Hogan Harris finished off the four-hitter for the A’s.

Muncy followed a leadoff walk by Tyler Soderstrom in the second inning with his homer, a line-drive into the A’s bullpen off Kansas City starter Michael Lorenzen.

Cardinals 8, Brewers 5: Nolan Gorman hit a three-run homer, Willson Contreras added a solo shot in the ninth inning and St. Louis defeated host Milwaukee to snap a six-game losing streak.

William Contreras hit a leadoff homer for Milwaukee that capped the scoring as the brothers both homered in the ninth inning.

Gorman’s homer, which chased starter José Quintana (4-2), made it 7-1 in the fifth.

Marlins 4, Nationals 3: Jesús Sánchez homered in the seventh, and Miami held off host Washington, which lost its seventh in a row.

The Nationals scored two runs in the ninth off Anthony Bender — one on a wild pitch, another on a misplayed grounder — and had the bases loaded with none out. But Bender got Amed Rosario to fly out, and Calvin Faucher earned the save when he induced James Wood to pop up.

Rangers 5, White Sox 4 (11): Adolis García delivered his sixth career walk-off hit with an RBI single with two out in the 11th to give Texas a victory over Chicago.

Rangers starter Jacob deGrom allowed two runs in six innings and struck out six.

TWINS’ LEWIS ON IL

The Minnesota Twins placed third baseman Royce Lewis on the 10-day injured list with a left hamstring strain.

Lewis was injured running to first base on a single in the ninth inning of Friday night’s 10-3 loss to Houston and had an MRI on Saturday.

Manager Rocco Baldelli said it was a mild strain.

“It’s not a severe strain, but it is a strain that’s going to keep him off the field for a little bit,” Baldelli said. “Definitely disappointing, but these are things that we deal with.”

Lewis said the doctors didn’t give him a timeframe for the injury but that he was already feeling better Saturday so he hopes he isn’t out too long.

The injury to Lewis comes after he missed the first 35 games of the season with a moderate strain of the same hamstring that occurred running out a ground ball in spring training.

Lewis, the first overall pick in the 2017 draft out of JSerra High School, has been plagued by injuries in his career. He played just 82 games last season while missing time with a severe quadriceps strain and a groin injury. Those injuries came after he tore the ACL in his right knee in both 2021 and 2022.

Lewis, who homered Friday night, is hitting .202 with two home runs and nine RBIs in 30 games this season.