Chicago Cubs' Welington Castillo (L) slides past Pittsburgh Pirates catcher Michael McKenry as he scores on a hit by David DeJesus in the eighth inning of a baseball game in Pittsburgh Saturday. — APSAN FRANCISCO — 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 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 41⁄2 games. Nationals 7, Marlins 6, 10 innings: Pinch-hitter Corey Brown singled to drive in Ian Desmond with Washington's winning run in the bottom of the 10th. Drew Storen (2-1) pitched a scoreless 10th inning for the win. 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: 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. The NL wild card leaders won their fourth straight, the previous three all shutouts. 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: Jeff Samardzija pitched the Cubs' first complete game in his final start of the season. 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. Reds 5, Astros 1: 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. Brewers 6, Cardinals 3: 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. 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: 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. Colorado Rockies and Philadelphia Phillies game was postponed due to inclement weather. — Agencies