ATLANTA -- Nick Castellanos hit two home runs and saved the game with a brilliant throw as the Philadelphia Phillies beat the Atlanta Braves 6-5 in 10 innings, handing the NL East champions their fifth loss in six games.
The Braves rallied from a four-run deficit and had a chance to walk off with the win in the ninth after pinch-runner Luke Williams stole second and third.
Orlando Arcia hit a fly ball down the right-field line that appeared deep enough to bring home the tagging Williams. But Castellanos made the catch in foul territory, spun around and threw home in time for Garrett Stubbs to tag the runner on the right shoulder before his foot touched the plate.
"I thought I should drop it," Castellanos said. "Then, at the last minute, a voice popped in my head and said, 'Catch it and throw him out.' "
Craig Kimbrel (8-6) claimed the win and Matt Strahm earned his second save.
In the 10th, Bryson Stott lined an opposite-field double down the third-base line that brought home two runs off A.J. Minter (3-6).
BREWERS 8, CARDINALS 2 Josh Donaldson hit a three-run home run in the first inning, Tyrone Taylor homered twice and Milwaukee beat St. Louis to take another step toward its second NL Central title in three years.
DIAMONDBACKS 7, GIANTS 1 Merrill Kelly (12-7) threw 6 2/3 strong innings, Corbin Carroll hit his 25th home run and stole his 50th base of the season, and Arizona won its fifth consecutive game by beating San Francisco.
METS 8, MARLINS 3 Brandon Nimmo hit a home run, double and single, Mark Vientos had his first career multi-home run game and New York beat Miami.
PADRES 3, ROCKIES 2 Luis Campusano tied the game with a bases-loaded single with one out in the seventh and Ji Man Choi followed with a sacrifice fly for his first RBI with San Diego, who beat Colorado to extend their season-best winning streak to seven.
PIRATES 13, CUBS 7 Joshua Palacios hit a three-run home run in a seven-run fourth inning and Chicago's postseason drive remained stalled with a loss to Pittsburgh, the Cubs' sixth loss in seven games. Connor Joe hit a two-run home run in the sixth as All-Star Justin Steele (16-5) lost his second consecutive start, allowing six runs and eight hits in three-plus innings.
ANGELS 8, RAYS 3 Brandon Drury homered twice with five RBI and Los Angeles stopped a six-game skid by beating AL wild card-leading Tampa Bay.
ASTROS 2, ORIOLES 1 Mauricio Dubon's RBI single with one out in the ninth inning lifted Houston to the win over Baltimore, helping the Astros avoid a sweep and stay a half-game ahead of Texas for first place in the AL West.
BLUE JAYS 6, YANKEES 1 Kevin Gausman (12-9) tossed six shutout innings, outpitching Michael King (4-7) as they traded strikeouts all night, and Toronto beat New York for its fifth consecutive victory.
MARINERS 6, ATHLETICS 3 Dominic Canzone homered and drove in four runs as Seattle beat Oakland to complete a three-game sweep and maintain their position in the tight AL West race.
RANGERS 15, RED SOX 5 Marcus Semien drove in three runs and scored for the AL-best 115th time, Jonah Heim and Mitch Garver hit back-to-back home runs and playoff-chasing Texas beat Boston.
ROYALS 6, GUARDIANS 2 Nelson Velazquez hit a three-run home run, Angel Zerpa (3-3) shut down Cleveland in relief of Zack Greinke, and Kansas City rolled to the victory and a three-game sweep.
NATIONALS 13, WHITE SOX 3 Lane Thomas hit a grand slam for Washington in a rout of Chicago.
TWINS 5, REDS 3 Jorge Polanco's two-run single capped a three-run ninth inning, helping Minnesota overcome Hunter Greene's 14 strikeouts to beat Cincinnati.
Philadelphia 6, Atlanta 5 (10)
Arizona 7, San Francisco 1
San Diego 3, Colorado 2
NY Mets 8, Miami 3
Pittsburgh 13, Chicago Cubs 7
Milwaukee 8, St. Louis 2
Texas 15, Boston 5
Houston 2, Baltimore 1
Kansas City 6, Cleveland 2
Seattle 6, Oakland 3
LA Angels 8, Tampa Bay 3
Toronto 6, NY Yankees 1
Minnesota 5, Cincinnati 3
Washington 13, Chicago White Sox 3
Detroit at LA Dodgers, (n)