Livan Hernandez (2-1) pitched the 10th and picked up the win. He struck out John Buck, got Scott Cousins to fly out to center, but Jose Reyes connected on a 3-1 pitch and homered into the second tier above the Marlins bullpen in right. Donovan Solano struck out to end the inning.
Ryan Braun, who hit a three-run homer in the sixth, struck out and on the play Carlos Gomez stole second. Ramirez hit a 0-1 pitch off the wall in center. His offense lifted the Brewers, who had blown a seven-run lead.
PIRATES 8, ASTROS 7
PITTSBURGH -- Drew Sutton hit a one-out solo homer in the bottom of the ninth and the Pirates improved to eight games over .500 for the first time in 20 years with a win over the Astros.
Acquired via waivers last week, Sutton homered for the first time since Oct. 3, 2010, lifting the Pirates to their sixth walkoff win of the season, the first via a home run.
The Pirates rallied from deficits of 4-0 and 6-2 to take a 7-6 lead on a Garrett Jones two-run homer in the seventh. But with Houston down to its last strike in the ninth, pinch-hitter Jason Castro drove in Jed Lowrie with a double.
Andrew McCutchen continued his recent torrid pace by going 3 for 4 with a home run, taking over the National League batting lead at .360.
METS 11, PHILLIES 1
Niese (5-3) pitched a season-high eight innings and gave up three hits, one a homer to Carlos Ruiz. His hit in the second inning put New York up for good.
The Mets put on a clinic of clutch hitting and slick fielding in handing the Phillies their sixth straight loss. The only thing they did wrong was run into two outs on the basepaths.
Daniel Murphy finished a homer short of the cycle, doubled twice, drove in four runs and made a leaping catch and diving stop at second base.
NATIONALS 9, GIANTS 3
WASHINGTON -- All-Star shortstop Ian Desmond hit his 14th home run, and the Washington Nationals became the latest team to beat up on Tim Lincecum, pounding the struggling right-hander hard early and often.
The opener of the three-game series between first-place teams was barely a contest. Jordan Zimmermann (5-6) pitched a rain-shortened six innings and again enjoyed the generous run support that had evaded him for so long, ensuring the Nationals would wake up on the Fourth of July with a 3½-game cushion over the New York Mets atop the NL East.
Lincecum (3-9) allowed eight runs and nine hits in 3 1-3 innings. Seven runs were earned, making it the worst start ERA-wise in his major league career.
BRAVES 10, CUBS 3
ATLANTA -- Newly chosen All-Star Chipper Jones delivered his first five-hit game in a decade, driving in four runs and leading the Braves over the Cubs.
Jones was added to the NL All-Star roster before the game. The 40-year-old third baseman replaced injured Dodgers outfielder Matt Kemp.
Jones, who plans to retire after this season, went 5 for 5 for his third career five-hit performance and first since Aug. 11, 2002.
After singling in the eighth inning, Jones was lifted for pinch runner Juan Francisco. Jones tipped his batting helmet as he received an ovation on his way to the dugout. He emerged from the dugout for another wave to the fans as the cheers continued.
Copyright 2012 by The Associated Press
This story is from ESPN.com's automated news wire. Wire index
MORE MLB HEADLINES
- Nats' closer calls out Harper's OF positioning
- Canseco accused of sexual assault in Vegas
- Reports: Shoulder surgery for Cards' Garcia
- Mattingly criticizes Dodgers before victory