SAN FRANCISCO (AP) - Hanley Ramirez hit a go-ahead RBI double in the top of the ninth and Los Angeles trimmed a game off their division deficit with a 3-2 win over NL West-leading San Francisco on Saturday.
Adrian Gonzalez led off the ninth with a triple against Jeremy Affeldt (1-2), then Ramirez came through with a double to the gap in right-center. That was the Dodgers' first hit in 15 tries this series with runners in scoring position.
Ronald Belisario (5-1) pitched out of trouble in the eighth for the victory, helping Los Angeles snap a four-game losing streak to San Francisco.
Buster Posey hit an RBI single in the first and Brandon Belt added a go-ahead RBI with a groundout in the eighth for the Giants, who lead the Dodgers by 4Â½ games.
Brandon League pitched the ninth to earn his 11th save.
NATIONALS 7, MARLINS 6, 10 innings
WASHINGTON (AP) - Pinch-hitter Corey Brown singled to drive in Ian Desmond with Washington's winning run in the bottom of the 10th.
After Adam LaRoche singled off Chad Guadin (3-2) to open the inning, Desmond singled him to third and Danny Espinosa was intentionally walked to load the bases. After a forceout at home, Brown blooped a single to right.
Drew Storen (2-1) pitched a scoreless 10th inning for the win.
After a 2:33 rain delay, Jayson Werth led off the bottom of the ninth with home run off Heath Bell to tie it at 6-all.
Ryan Zimmerman's 20th homer of the season, a two-run shot with no outs in the eighth, cut Miami's lead to 6-5.
Miami starter Mark Buehrle allowed three runs and five hits in seven innings and struck out five.
Nationals starter Ross Detwiler gave up five runs, three earned, in five innings.
BRAVES 11, METS 3
NEW YORK (AP) - Kris Medlen extended Atlanta's scoreless streak to 31 innings - its best string in more than 20 years - and slumping Brian McCann drove in four runs with four hits.
A tornado touched down in Queens about 15 miles away several hours before the game. Dark, ominous clouds swept in later, causing a 75-minute rain delay after the sixth inning.
The NL wild card leaders won their fourth straight, the previous three all shutouts.
McCann homered, doubled and tied a career high for hits and Dan Uggla had three hits and two walks, scoring three times.
Medlen (8-1) allowed four hits, left with an 8-2 lead after the rain and contributed a long RBI double. He went 40 1-3 innings without allowing an earned run.
Atlanta has won the last 19 games Medlen has started, dating to 2010. He improved to 13-0 in his last 24 starts overall.
Jeremy Hefner (2-6) gave up five runs and eight hits in 2 2-3 innings.
CUBS 4, PIRATES 3
PITTSBURGH (AP) - Jeff Samardzija pitched the Cubs' first complete game in his final start of the season.
David DeJesus singled in Welington Castillo with two outs in the eighth for the go-ahead run after Pittsburgh had tied the game at 3 in the bottom of the seventh.
Samardzija (9-13) overcame a rocky first inning to allow two hits over his final 8 2-3 innings. With the 27-year-old in his first full season as a major league starter, the Cubs announced Friday their intention to shut him down for the season.
Batting in the No. 9 spot in the order, Chicago's Tony Campana had two hits and scored two runs. Alfonso Soriano hit his 27th home run for the Cubs, who arrived in Pittsburgh having lost 17 of their previous 18 road games but won for the second consecutive night.
Pedro Alvarez two hits and two RBIs for the Pirates, who have lost six of eight and were passed by Los Angeles for third place in the NL wild card standings.
Samardzija had nine strikeouts, allowing four hits, one walk and two earned runs in his first career complete game.
REDS 5, ASTROS 1
CINCINNATI (AP) - Bronson Arroyo extended his personal winning streak to five games and Jay Bruce and Brandon Phillips hit solo home runs for Cincinnati.
Phillips and Joey Votto both had two hits to help Arroyo improve to 8-1 over his last nine starts and 9-2 since July 6.
Arroyo (12-7) had at least one baserunner in every inning except the seventh - his last - but allowed just a first-inning run. The Astros had seven hits and two walks with five strikeouts.
Sean Marshall allowed a walk in the eighth and Jonathan Broxton gave up two hits while finishing the game in the ninth.
Houston starter Bud Norris (5-12) saw his career-long losing streak stretch to 11 games, dating to May 31. He allowed six hits and five runs with two walks and three strikeouts in 5 1-3 innings.
BREWERS 6, CARDINALS 3
ST. LOUIS (AP) - Aramis Ramirez had three hits, including his 22nd home run, to lead Milwaukee.
Ricky Weeks added a solo home run and Ryan Braun went 3 for 5 with a run scored for Milwaukee. Carlos Gomez went 2 for 4 and drove in two runs.
Ramirez, who walked twice, reached base all five times he batted and scored twice. After a slow start, he has raised his average over the past 89 games from .218 to an even .300.
Mike Fiers (9-7) allowed one run and five hits in five innings and also got his first career RBI with a single in the second inning. He walked three and struck out five. John Axford pitched a scoreless ninth for his 27th save.
Adron Chambers had an RBI triple for St. Louis. Jake Westbrook (13-11) went five innings and allowed three runs and seven hits.
Milwaukee improved to 15-4 in its last 19 games and pulled five games behind the Cardinals for the second wild card in the National League.
DIAMONDBACKS 8, PADRES 5
SAN DIEGO (AP) - Jason Kubel hit two of Arizona's four home runs as the Diamondbacks snapped a seven-game losing streak to San Diego.
Aaron Hill and Justin Upton hit solo homers as Arizona finished with 15 hits. Upton had a season-high four hits and Jake Elmore added two RBIs.
Kubel hit a two-run homer in the first inning. Hill led off the third with his 22nd homer before Kubel followed two pitches later for his career-high 29th home run. Upton connected off Miles Mikolas in the fifth on a line drive that carried 443 yards to straightaway center field for a 7-4 lead.
Rookie Wade Miley (15-9) won despite giving up five runs and eight hits in 5 1-3 innings. The left-hander struck out six and had three walks to snap his streak of 24 consecutive starts without issuing more than two walks.
J.J. Putz struck out the side in the ninth for his 29th save in 34 chances.
Both of Kubel's homers and Hill's came off rookie Casey Kelly (1-1), who lasted into the third inning in his third major-league start.