SAN FRANCISCO — Fernando Tatis Jr. hit his NL-leading 39th homer, and the San Diego Padres beat the San Francisco Giants 7-4 on Thursday to earn a series split.
The Padres moved within half a game of the idle Cardinals for the second NL wild card at 76-70. San Diego starts a three-game series in St. Louis on Friday.
Tatis also singled and walked twice a day after matching a career best with four hits. Tommy Pham and Manny Machado each drove in two runs, and Adam Frazier and Austin Nola had three hits apiece.
Evan Longoria homered for the NL West-leading Giants, whose lead over the Dodgers dropped to a game. Los Angeles was off Thursday.
Nabil Crismatt (3-1) pitched four scoreless innings in relief to earn the win in a bullpen game for the Padres.
Giants starter Kevin Gausman (14-6) lost for the first time since July 30, allowing four earned runs on eight hits in five innings.
ORIOLES 3, YANKEES 2
BALTIMORE (AP) — Yankees reliever Clay Holmes threw a wild pitch with two outs in the ninth inning that let the tying run score, then Austin Hays chopped an RBI single in the 10th that lifted Baltimore and dropped New York back in the AL wild-card race.
The Yankees fell a half-game behind idle Toronto and Boston atop the AL wild-card standings. New York had won three in a row.
Jahmai Jones, pinch-running for automatic runner Austin Wynns, moved to third on Richie Martin's leadoff bunt single against Wandy Peralta (5-4) in the 10th. After Cedric Mullins walked and Mountcastle struck out, Hays grounded a single to left over a drawn-in infield to win it.
Cole Sulser (5-4) pitched two scoreless innings for Baltimore.
PHILLIES 17, CUBS 8
PHILADELPHIA (AP) — Bryce Harper doubled to start a seven-run, game-tying rally in the fourth inning, drove in the go-ahead run in the sixth and sealed Philadelphia's win over Chicago with a three-run home run in the seventh.
The Phillies are three games behind first-place Atlanta — rained out Thursday — in the NL East with 16 games left this season, and 2 1/2 games behind St. Louis for the second wild card. San Diego and Cincinnati also lead Philadelphia in the wild-card chase.
Harper lined an RBI double the other way to left off Manuel Rodriguez (3-3) with one out in the sixth for an 8-7 lead. He smashed his 33rd homer of the season into the second deck in the seventh, a three-run shot off Rex Brothers for 15-8 lead.
Hector Neris (3-6) got the win in two innings of relief.
ATHLETICS 7, ROYALS 2
KANSAS CITY, Mo. (AP) — Salvador Perez tied Johnny Bench's record for homers in a season by a catcher with his 45th, but Chad Pinder's two-run single spurred a third-inning rally and Oakland held off Kansas City.
Perez hit a two-run homer in the first inning, matching Bench's total from 1970 for the most by a player who played at least 75% of his team's games at catcher. Perez is tied with Toronto's Vladimir Guerrero Jr. for the major league lead in homers and also leads the bigs with 112 RBIs.
Oakland started the day 3 1/2 games behind Toronto, Boston and the New York Yankees for the two AL wild cards.
Paul Blackburn (1-2) battled through five-plus innings for Oakland, yielding two runs on six hits.
Daniel Lynch (4-5) took the loss. He left the game in the third inning with left calf tightness with the bases loaded and a full count on Matt Olson. He gave up three runs (one earned) on two hits in two-plus innings. He also walked one and hit two batters.
REDS 1, PIRATES 0
PITTSBURGH (AP) — Tyler Mahle cruised through six innings, Asdrúbal Cabrera hit a go-ahead, pinch-hit sacrifice fly in the seventh, and Cincinnati avoided a three-game sweep against Pittsburgh.
Mahle (12-5) allowed five hits — all singles — and struck out four with a walk as the Reds salvaged the finale of a nine-game road trip that saw them lose a little bit of ground in the chase for the second NL wild-card spot.
Mychal Givens worked out of a two-on, one-out jam in the ninth by striking out Hoy Park on a full-count fastball for his eighth save as the Reds bounced back after a pair of one-run losses to the last-place Pirates.
Cabrera provided the game's only run while pinch-hitting for Mahle in the top of the seventh against Cody Ponce (0-4).
ASTROS 12, RANGERS 1
ARLINGTON, Texas (AP) — Carlos Correa triggered Houston's seven-run fourth inning with a three-run homer, and replacement starter Luis Garcia took a shutout into the sixth.
The AL West-leading Astros stayed seven games in front of Oakland with 16 games remaining. They took three of four in their final series with the last-place Rangers.
Garcia (11-7) started after left-hander Framber Valdez was scratched because of a cut on the index finger of his pitching hand. The 24-year-old Garcia allowed a run and five hits in 5 1/3 innings.
Texas rookie Glenn Otto (0-2) allowed seven hits and seven runs in 3 1/3 innings.
RAYS 5, TIGERS 2
ST. PETERSBURG, Fla. (AP) — Yandy Díaz hit a leadoff home run and Mike Zunino later connected, reliever Dietrich Enns (2-0) pitched four solid innings and AL East-leading Tampa Bay beat Detroit.
The Rays lead second-place Boston and Toronto by 8 1/2 games. The fourth-place New York Yankees are nine back.
Tampa Bay slugger Nelson Cruz left the game in the sixth with a bruised right forearm. He was hit by a pitch on the arm during the first inning.
Niko Goodrum and Jeimer Candelario homered for the Tigers, who took two of three from Tampa Bay last weekend. Tyler Alexander (2-3) allowed four runs and five hits over 5 2⁄3 innings.
ANGELS 9, WHITE SOX 3
CHICAGO (AP) — Alex Cobb pitched five scoreless innings, Luis Rengifo and Jose Rojas hit home runs, and Los Angeles coasted over Chicago.
Cobb was activated from the 10-day injured list after suffering right wrist inflammation and allowed two hits in his first start since July 23. Cobb (8-3) allowed only two baserunners to advance as far as second base, and he induced inning-ending double plays in the second and fourth innings.
Chicago starter Reynaldo Lopez (3-3) allowed a season-high seven runs in his seventh start of the season. Lopez had allowed two home runs in his previous 30 innings prior to surrendering homers to Rengifo and Rojas.