SAN FRANCISCO — Baltimore’s Jonathan Schoop hit a three-run homer in the ninth inning as the Orioles overcame a six-run deficit and won 8-7 on Sunday, handing struggling San Francisco another deflating loss.
The victory kept the Orioles half a game behind American League East leader Toronto, which beat Houston, while the Giants only maintained their precarious one-game lead in the National League West because the Los Angeles Dodgers were beaten at home by Pittsburgh.
In the day’s other key contests, St. Louis also staged a late comeback to win at the majors-leading Chicago Cubs, and Detroit made it back-to-back shutout wins over Texas.
San Francisco, which led the NL West by 6-1/2 games at the All-Star break but have lost two thirds of their games since, looked like getting a morale-boosting win when it led 7-1 after six innings but it all went wrong from then.
Matt Wieters tripled and had a career-best five hits to keep Baltimore in it as the visitors scored two runs in both the seventh and eighth innings.
Then in the ninth inning, Manny Machado singled and Mark Trumbo walked, and with two out, Schoop hit his three-run shot off Santiago Castilla to snatch victory.
Toronto kept its nose in front of Baltimore by beating Houston 9-2.
Blue Jays starter Marcus Stroman allowed only one earned run in 6-1/3 innings.
Troy Tulowitzki went 3 for 4 with three RBIs. He drove in a run in the first, singled and scored in the fourth, and homered in the fifth. Russell Martin followed that homer with a first-pitch blast. It was the seventh time this season Toronto has hit consecutive home runs.
St. Louis scored five runs in the eighth inning to overrun the Cubs and win 6-4.
Stephen Piscotty hit a three-run homer off Chicago setup man Hector Rondon, who entered the game with a 3-1 lead in his first appearance after two weeks out with a triceps injury. After Kolten Wong and Greg Garcia singled, Piscotty lofted a shot to deep left-center field that put the Cardinals ahead 4-3.
Brandon Moss followed with a solo shot one out later.
Detroit’s Michael Fulmer pitched a shutout as the Tigers held AL West leader Texas scoreless again.
Fulmer became the first Detroit rookie to throw a shutout since Justin Verlander 10 years ago. He retired 16 of the last 17 hitters he faced as the Tigers kept Texas scoreless over the final 21 innings of the three-game series.
Victor Martinez started the scoring with a two-run shot in the fourth, and J.D. Martinez hit his 100th career homer to give the Tigers a 6-0 lead in the seventh.
Pittsburgh scored five times in the first inning to set up an 11-3 win at the Dodgers.
Josh Harrison and Adam Frazier each had four hits while Sean Rodriguez homered and had four RBIs for the Pirates.
Los Angeles starter Brett Anderson did not have a good return in his first start of the season following back surgery, giving up five runs in the first and immediately quitting due to a wrist sprain.
Miami’s left fielder Christian Yelich threw out Carlos Sanchez trying to score from second base with two outs in the ninth inning, preserving a 5-4 win for the Marlins against the Chicago White Sox.
With runners at first and second, Chicago’s Tyler Saladino hit to left field where Yelich charged to field the ball on one hop and threw on the fly to catcher Jeff Mathis, who blocked the plate and tagged Sanchez for the game-ending out.
Cleveland won 5-4 to send the Los Angeles Angels to their tenth straight loss.
The AL Central-leading Indians completed a four-game sweep. The Angels went 0-9 on their trip and are mired in their worst run off defeats since an 11-game losing spiral in 1999.
Abraham Almonte singled home the go-ahead run in the sixth inning.
Angels slugger Albert Pujols was ejected after being called out on strikes in the eighth while Mike Trout was given the day off, ending his consecutive games played streak at 178.
Seattle made it eight wins from nine games with an 8-4 victory at Oakland.
Kyle Seager doubled twice and drove in four runs for the Mariners, who moved within two games of the provisional second wildcard spot in the AL.
Washington’s Tanner Roark won his fourth straight start to guide the Nationals past Atlanta 9-1.
Boston’s Mookie Betts hit three home runs and drove in a career-best eight runs, joining the great Ted Williams as the only Red Sox players in over 100 years with a pair of three-homer games in a season and powering the hosts past Arizona 16-2.
Philadelphia’s Jimmy Paredes singled, doubled, homered and drove in three runs as the Phillies held on to edge Colorado 7-6 and complete a three-game sweep.
New York’s Steven Matz held San Diego hitless into the eighth inning, steering the Mets to a 5-1 victory and their first back-to-back wins in more than a month.
Tampa Bay’s Corey Dickerson hit a three-run homer and Evan Longoria added a three-run double as the Rays cruised to a 12-3 win against a New York Yankees team that started eight players 26 years old or younger for the first time in 49 years.
Kansas City’s Paulo Orlando and Lorenzo Cain each had four hits and three RBIs as the Royals beat Minnesota 11-4 to win a road series for the first time since June.
Milwaukee’s Ryan Braun hit two homers, doubled and drove in six runs to power the Brewers past Cincinnati 7-3.