Logan Webb pitched seven splendid innings, pinch-hitter Wilmer Flores delivered a go-ahead double and the host San Francisco Giants beat the Cleveland Guardians 2-1 on Thursday to stop a four-game losing streak.

Webb (7-5) gave up seven hits but struck out nine. The right-hander did not issue a walk as he lowered his ERA to 2.49.

Cleveland starter Gavin Williams held the Giants scoreless through six innings, but San Francisco got to the Guardians’ bullpen in the seventh. Casey Schmitt greeted Matt Festa (1-1) with a single to open the inning. Festa walked Jung Hoo Lee before Patrick Bailey laid down a sacrifice bunt.

Nic Enright replaced Festa and then Flores, batting for Christian Koss, drilled a double down the left-field line to score Schmitt and Lee.

Phillies 2, Marlins 1: Kyle Schwarber hit a tiebreaking solo home run in the eighth, Christopher Sánchez pitched eight sharp innings and visiting Philadelphia beat Miami.

Sánchez (6-2) allowed five hits, one run and struck out four. Philadelphia took three of four in the series.

Schwarber has 23 home runs on the season.

Twins 12, Reds 5: Byron Buxton hit two home runs, including the second of back-to-back shots with Kody Clemens, and Ryan Jeffers had a homer and four RBIs as visiting Minnesota beat Cincinnati to end a six-game losing streak.

Buxton drove a 1-2 pitch from Nick Martinez out to left field to give him leadoff homers in consecutive games.

Royals 4, Rangers 1: Top prospect Jac Caglianone went deep twice for his first two homers in the majors and visiting Kansas City finished its first three-game sweep at Texas since 2003 with a win over the Rangers.

Vinnie Pasquantino added a two-run shot, and Michael Wacha (4-6) held the Rangers hitless until Wyatt Langford’s one-out single in the sixth.

Brewers 8, Cubs 7: Isaac Collins hit a three-run homer, rookie Caleb Durbin added a two-run drive and visiting Milwaukee held off Chicago.

Rhys Hoskins lofted a solo shot and Christian Yelich, Jackson Chuorio and Joey Ortiz had two hits apiece for the Brewers.

Pete Crow-Armstrong lined his 20th home run and Dansby Swanson and Ian Happ also went deep for the Cubs.

Diamondbacks 9, Blue Jays 5: Eugenio Suárez homered and drove in four runs, Ryne Nelson pitched 5 2/3 innings for his second straight win and visiting Arizona beat Toronto to avoid a three-game sweep.

Pavin Smith also homered and drove in three runs for the Diamondbacks.

Cardinals 5-8 , White Sox 4-6, 2nd game 10 innings: Nolan Arenado hit his 350th homer in the third inning and drove in the go-ahead run in the 10th to help visiting St. Louis beat Chicago to sweep a doubleheader and hand the White Sox their eighth straight loss.

Willson Contreras homered and drove in three runs to help the Cardinals rally for a win in the opener.

Braves 7, Mets 1: Matt Olson hit a three-run double, Spencer Strider struck out eight in six innings and host Atlanta beat New York the Mets to complete a series sweep that extended the Mets’ season-worst losing streak to six games.

New York’s latest sloppy defeat, paired with Philadelphia’s 2-1 win over Miami, left the Mets and Phillies tied for first place in the NL East heading into their upcoming weekend series.

Tigers 9-4, Pirates 2-8, 2nd game 10 innings: Isiah Kiner-Falefa hit a two-run single in a four-run 10th inning and visiting Pittsburgh beat Detroit for a split of a doubleheader.

The Tigers won the first game behind four RBIs from Riley Greene.

Pinch-hitter Ke’Bryan Hayes led off the 10th with a single to right for Pittsburgh, scoring pinch-runner Tommy Pham from second. Nick Gonzales singled, and a sacrifice bunt put runners on second and third. An intentional walk to Jared Triolo loaded the bases, and pinch-hitter Joey Bart had an RBI single to make it 6-4. One out later, Kiner-Falefa hit a single to left to bring home two more runs.

Orioles 4, Rays 1: Colton Cowser hit a three-run homer and Charlie Morton (4-7) allowed one run over six innings in his 400th major league game as visiting Baltimore beat Tampa Bay.

In the top of the seventh, Rays pitcher Hunter Bigge was carted off the field in a frightening scene after he was struck by a foul ball in the dugout.

Orioles catcher Adley Rutschman fouled a pitch into the Tampa Bay dugout and it hit Bigge, a 27-year-old right-hander currently on the injured list with a lat strain.

Emergency medical personnel quickly arrived to attend to Bigge, who was placed on a backboard and carted off. He gave a thumbs-up gesture.

Nationals 4, Rockies 3, 11 innings: James Wood hit a pair of two-run homers, including a game-winning shot in the 11th inning, and host Washington snapped its 11-game losing streak with a victory over Colorado.

Pirates’ Santana involved in row with fan: Pittsburgh Pirates reliever Dennis Santana was involved in an altercation with a fan during the second game of Thursday’s doubleheader with the Detroit Tigers and at one point is seen leaping and swiping at the person.

In videos posted to social media, Santana can be seen pointing out the fan to a police officer before jumping and swinging at the person who is in the front row above the Pittsburgh bullpen at Comerica Park.

The fan appeared to be wearing a Tigers hat and a shirt honoring Pirates Hall of Famer Roberto Clemente.

After jumping at the fan, Santana was escorted away by Pirates bullpen personnel and held back by a teammate.

He entered the game in the ninth inning, pitching to one batter before the game was delayed by rain.

Diamondbacks catcher Moreno to IL: The Arizona Diamondbacks put catcher Gabriel Moreno on the 10-day injured list Thursday because of a contusion on his right hand. The move is retroactive to June 16.

Arizona selected catcher Aramis Garcia from Triple-A Reno.

Phillies’ Nola moved to 60-day IL: The Philadelphia Phillies moved right-hander Aaron Nola to the 60-day injured list on Thursday, a week after he injured his ribcage while trying to work himself back from a sprained right ankle.