PITTSBURGH (AP) - Logan Forsythe and Rene Rivera delivered consecutive RBI singles in the ninth inning off Pittsburgh closer Mark Melancon and the San Diego Padres rallied for a 3-2 victory on Wednesday night.
Forsythe's single to right scored pinch-runner Andrew Cashner to tie it and Rivera's blooper brought home Chris Denorfia as the Padres sent the Pirates to their third straight loss. Dale Thayer (3-5) picked up the win in relief. Huston Street pitched a perfect ninth for his 33rd save.
Melancon (2-2), who inherited the closer's role when All-Star Jason Grilli went out with a forearm injury in July, blew his third save of the season.
DIAMONDBACKS 9, DODGERS 4
PHOENIX (AP) - Paul Goldschmidt homered and the Arizona Diamondbacks blew the game open late to prevent Los Angeles from clinching the NL West title.
Goldschmidt's opposite-field two-run shot off Stephen Fife (4-4) in the first inning moved him into the NL lead with 34 home runs.
Yasiel Puig hit a solo home run calculated at 442 feet for the Dodgers, who have lost five of six and get one more chance to clinch in Arizona in the series finale Thursday.
The Dodgers' Adrian Gonzalez was ejected after Michael Young was called out at the plate in a close play in the sixth inning.
Brandon McCarthy (5-9) went six-plus innings to get the victory. Arizona broke open a close game with five runs in the eighth.
BRAVES 5 NATIONALS 2
WASHINGTON (AP) - Justin Upton and Dan Uggla each homered in a three-run sixth inning, and the Braves rallied past the Nationals, lowering their magic number for clinching the NL East title to two games.
Brian McCann and Jordan Schafer also drove in runs as the Braves snapped a three-game skid. Atlanta has not won the division since 2005, the last of 11 straight titles.
Kameron Loe (1-2) got one out for the win. Craig Kimbrel, Atlanta's seventh pitcher, rebounded from his loss Tuesday to record his 48th save.
Denard Span extended his hitting streak to 29 straight, the longest in the majors this season.
CARDINALS 4, ROCKIES 3
DENVER (AP) - Adam Wainwright pitched effectively into the eighth after a shaky start and helped himself at the plate with three hits as the Cardinals beat the Rockies to expand their lead in the NL Central race.
Wainwright (17-9) gave up two runs in the first and then found his groove to earn his 17th win, second-most in the NL this season.
He went 3 for 3 with a double and two RBIs to help the Cardinals stretch their lead to two games over Pittsburgh after the Pirates lost 3-2 loss to San Diego. St. Louis also reduced its magic number for clinching a playoff spot to three with 10 games to play.
Tyler Chatwood (7-5) allowed four runs in six innings before being lifted for a pinch hitter. Chatwood is rounding back into form after missing nearly a month with an inflamed right elbow.
Ross Ohlendorf (4-1) allowed three runs over six innings.
MARLINS 4, PHILLIES 3, 10 INNINGS
PHILADELPHIA (AP) - Ed Lucas homered in the 10th inning to lift the Marlins to a victory over the Phillies.
The Phillies loaded the bases with one out in the bottom of the inning but could not score after Roger Bernadina struck out and Freddy Galvis grounded out to end it.
The homer was the fourth of the season for Lucas. Miami's Giancarlo Stanton tied the game 3-all in the sixth inning with a two-run, homer to center field that was measured at 460 feet.
Brad Hand (1-1) got the victory for pitching a scoreless ninth.
Cesar Jimenez (1-1) was the loser as Miami snapped its seven-game skid to Philadelphia.
METS 5, GIANTS 4
NEW YORK (AP) - Josh Satin hit a two-run single to cap a four-run rally in the ninth inning that sent the Mets past San Francisco.
Shut down by Matt Cain for almost eight innings, the makeshift Mets lineup put together a surprising comeback. Pinch-hitter Zach Lutz had an RBI double and Juan Centeno, making his major league debut, knocked in a run with a single off closer Sergio Romo (4-8).
Satin had three RBIs, including a sacrifice fly against Cain in the eighth. Vic Black (2-0) pitched a perfect inning for the win.
Gregor Blanco hit a two-run homer for San Francisco.
BREWERS 7, CUBS 0
MILWAUKEE (AP) - Sean Halton hit his first career grand slam, Tyler Thornburg allowed just two singles over six innings, and the Brewers beat the Cubs.
Thornburg (3-1) struck out four and walked two as he reached six innings for the sixth straight start since being recalled from Triple A Nashville on June 29. He has allowed five earned runs in 36 innings as a starter and has also made 11 relief appearances for the Brewers this season. At Nashville, he was 0-9 with a 5.79 ERA in 15 starts.
Jimmy Nelson pitched two innings and Michael Blazek got the last three outs to preserve the four-hit shutout.
Halton's homer capped a five-run first inning off Chris Rusin (2-5).
REDS 6, ASTROS 5, 13 innings
HOUSTON (AP) - Jay Bruce's two-run double in the 13th inning put Cincinnati ahead for good.
Rookie base-stealing specialist Billy Hamilton got his first three career hits, had four steals, an RBI and scored the go-ahead run in his first major league start.
Hamilton walked to start the 13th and stole second before Shin-Soo Choo walked. They advanced on a wild pitch before Jorge De Leon (0-1) intentionally walked Joey Votto with one out.
Bruce's third double of the game made it 6-4. He had seven hits and 10 RBIs in the series.
Alfredo Simon (6-4) pitched three scoreless innings for Cincinnati. Aroldis Chapman allowed a hit and a run in the 13th, but struck out Chris Carter to end the 5-hour, 18-minute game for his 37th save.
Brandon Barnes hit a solo homer and Carlos Corporan drove in two runs for Houston.