ARLINGTON, Texas (AP) -- San Francisco rookie Kelby Tomlinson made the key contribution to victory for the second straight day, driving in the winning run with a bases-loaded single in the ninth inning to give the Giants a 5-4 win against high-flying St. Louis on Friday.
A day after hitting a grand slam with his first major-league homer, Tomlinson again took the laurels as the Giants kept up their challenge to National League West leader Los Angeles after the Dodgers beat the Chicago Cubs.
In the American League, Kansas City won a tight game at Tampa Bay to maintain its yawning 13-game gap atop the AL Central. Minnesota, which is second in the division, stands little hope of making up that deficit, but the Twins remained in the thick of the wild-card race by producing a shutout win against AL West leader Houston.
San Francisco's Marlon Byrd hit a grand slam in the third inning -- the Giants franchise-record eighth grand slam of the season -- but it took until the ninth for the hosts to edge ahead.
With one out, and the Cardinals adding a fifth infielder, Tomlinson still managed to find a gap up the middle for a single off St. Louis' Kevin Siegrist (5-1), who took his first loss of the season.
The Giants stayed 2-1/2 games behind the Dodgers, who beat the Cubs 4-1 thanks to a brilliant performance by pitcher Clayton Kershaw, who struck out a season high-tying 14.
Kershaw (11-6) allowed one run and one walk in eight innings to give the Dodgers victory in their first home game in two weeks.
Kansas City's Kendrys Morales hit a two-run homer to help the Royals win 3-2 at Tampa Bay.
Morales' shot hit an overhanging catwalk and put the Royals up 3-1 in the third. He leads the majors this season in runs driven in when there are two outs in an inning, tallying 46.
Kansas City starter Edinson Volquez (12-7) allowed two runs in 6 2/3 innings.
Minnesota's Eduardo Nunez homered in a 3-0 win against Houston, keeping the Twins within half a game of the second wild-card spot.
Twins starter Kyle Gibson (9-9) pitched 5-2/3 scoreless innings to guide Minnesota to its seventh win in eight games.
Toronto's Josh Donaldson and Troy Tulowitzki hit back-to-back homers and Jose Bautista also connected as the Blue Jays won 5-3 at home against Detroit.
All three Blue Jays homers came off Tigers rookie Matt Boyd (1-5), one of the three left-handed pitchers acquired by Detroit in last month's trade that sent David Price to Toronto.
Toronto maintained a 1-1/2 game lead atop the AL East, while Detroit has lost seven of eight.
Boston's Blake Swihart hit an inside-the-park home run in the 10th inning to help the Red Sox to a 6-4 win at New York, snapping the Mets' seven-game winning streak.
The Red Sox, visiting the Mets for the first time in 14 years, scored three times in the 10th. Swihart led off with a drive that appeared to clear the centerfield wall and bounce back into play, but the ball was ruled in play.
In the bottom of the tenth, Red Sox reliever Junichi Tazawa walked four straight batters with two outs to force home a run. Craig Breslow replaced Tazawa and retired Yoenis Cespedes on a fly ball with the bases loaded to end it.
Texas' Cole Hamels delivered his best performance yet for the Rangers, striking out 10 in eight innings to beat Baltimore 4-1.
Hamels (2-1) gave up one run, and the three-time All-Star won for the first time at his new home after a pair of no-decisions.
The Orioles have lost eight of nine to drift from playoff contention.
Pittsburgh's bullpen continued its hot streak in securing a 5-3 win against Colorado.
Tony Watson (3-1) earned the win with a scoreless eighth inning before Josh Harrison singled home Francisco Cervelli with the go-ahead run in the bottom of the eighth.
Mark Melancon worked a perfect ninth for his major league-leading 42nd save. Pittsburgh relievers haven't lost a decision since June 25.
Cleveland's Trevor Bauer, starting in place of an ill Danny Salazar, allowed one run in eight innings to guide the Indians to a 3-1 victory over the Los Angeles Angels.
New York's Didi Gregorius drove in a career-high six runs and Brian McCann hit a three-run homer against his old team as the Yankees emphatically ended a scoring slump and routed Atlanta 15-4.
Seattle's Kyle Seager and Franklin Gutierrez both had three hits and a homer and that was enough to produce a 2-0 win against the Chicago White Sox.
Arizona's Aaron Hill doubled home the go-ahead run in the seventh inning as the Diamondbacks beat Oakland 6-4.
Miami's Martin Prado and Marcell Ozuna homered off Max Scherzer as the Marlins beat struggling Washington 4-3.
Philadelphia rookie Aaron Nola pitched seven strong innings to steer the Phillies to a 7-1 win against San Diego.
Milwaukee's Taylor Jungmann pitched six strong innings to help the Brewers beat Cincinnati 5-0.