The NL Central-leading Pirates have won six of seven and 10 of 12. They are 34-19 since May 12 for the best record in the majors over that stretch.
Casey McGehee went 3 for 4 with two RBIs for Pittsburgh (48-37), which is 11 games over .500 for the first time since 1992 and in first place at the break for the first time since 1997. A.J. Burnett (10-2) pitched effectively into the seventh to win his ninth consecutive decision.
Giants pitcher Tim Lincecum (3-10) failed to get out of the fourth inning for the second consecutive start and was charged with six runs and seven hits. The two-time Cy Young Award winner enters the break with a 6.42 ERA that is worst in the majors among qualifying starters.
Pablo Sandoval hit a two-run homer for San Francisco, which has lost five of six and seven of nine.
BRAVES 4, PHILLIES 3
PHILADELPHIA (AP) — Brian McCann homered for the fourth consecutive game and Dan Uggla hit a two-run shot to lead the Braves to the three-game series sweep.
McCann hit a grand slam on Friday and a solo shot on Saturday. He then hit the go-ahead homer in the seventh inning against Raul Valdes (2-2) in the series finale.
The five-time NL East champion Phillies stumbled into the All-Star break. They have lost 10 of 11 and are 13 games under .500 (37-50).
Jason Pridie homered, doubled and had three RBIs as a last-minute replacement for Shane Victorino. The Phillies did not say why Victorino was scratched after the badly slumping outfielder was scheduled to hit seventh.
Jair Jurrjens (3-2) pitched seven innings to win his second straight start. Craig Kimbrel worked a scoreless ninth for his 25th save.
CUBS 7, METS 0
NEW YORK (AP) — Canadian Ryan Dempster extended his scoreless streak to 27 innings in his first start in three weeks, and Starlin Castro hit a three-run homer for the Cubs.
Dempster (4-3) was activated from the disabled list, then pitched five innings of four-hit ball. It was his first outing since June 15, when he experienced tightness in a back muscle. His lengthy string of zeros is the Cubs' best for a starter since Ken Holtzman went 27 innings in 1971.
Geovany Soto hit a two-run single in Chicago's four-run first.
Jonathon Niese (7-4) allowed seven runs and nine hits in seven innings for New York.
CARDINALS 5, MARLINS 4
ST. LOUIS (AP) — Rafael Furcal hit a two-run single off Heath Bell with two out in the ninth inning, capping a three-run rally and lifting the Cardinals to the victory.
Pinch-hitter Austin Kearns put the Marlins up 4-2 with a three-run homer in the seventh.
It was the sixth blown save in 25 chances for Bell (2-5), who signed with Miami over the winter.
Cardinals reliever Mitchell Boggs (2-1) struck out Donovan Solano with the bases loaded to end the ninth.
The Marlins finished the series without two of their stars. Giancarlo Stanton, the team's lone All-Star, underwent arthroscopic surgery on his right knee Sunday, and Hanley Ramirez was taken out after five innings of the series finale with a lacerated right finger.
ROCKIES 4, NATIONALS 3
WASHINGTON (AP) — Jordan Pacheco doubled and scored the tie-breaking run on a ninth-inning wild pitch by Tyler Clippard, giving the Rockies a comeback victory.
The NL East-leading Nationals took a 3-1 lead into the eighth, but a meltdown by their usually reliable bullpen cost them a chance to hit the All-Star break with their best record since the team moved to Washington in 2005.
Colorado's rally was fuelled by Eric Young's first homer of the season and a pair of wild pitches.
Rex Brothers (4-2) worked the eighth and Rafael Betancourt got his 15th save, striking out pinch-hitter Jesus Flores with two outs and runners at second and third.
Ian Desmond homered and Adam LaRoche had two hits and scored a run for the Nationals. Clippard (2-3) got the loss.
DIAMONDBACKS 7, DODGERS 1
PHOENIX (AP) — Trevor Bauer scattered two hits over six scoreless innings, leading Arizona to the victory.
Paul Goldschmidt homered, doubled and drove in a career-high four runs for the Diamondbacks, who won the final three games of the four-game set to move within four games of the NL West-leading Dodgers.
Bauer (1-1) struck out six, walked one and retired the final 12 batters he faced to earn his first major league victory. He was the third pick in the 2011 draft. Patrick Corbin pitched the final three innings for his first career save.
Chris Capuano (9-4) allowed a season-high five runs over five innings for the Dodgers, who remained a half-game ahead of the Giants heading into the All-Star break. Los Angeles had not led the division at the break since 2009.
Bauer (1-1) struck out six and walked one.
BREWERS 5, ASTROS 3, 10 INNINGS
HOUSTON (AP) — Corey Hart drove in the go-ahead run with a single in the 10th inning, and Rickie Weeks' third hit added an insurance run for Milwaukee.
Nyjer Morgan walked to start the 10th and Fernando Rodriguez (1-8) intentionally walked Ryan Braun before a wild pitch moved the pair over.
Rodriguez walked Aramis Ramirez to load the bases and Hart's full-count grounder put Milwaukee on top. Weeks, who homered in the second, then singled in Braun.
Manny Parra (1-3) pitched a perfect ninth for the win and John Axford of Simcoe, Ont., allowed two hits in a scoreless 10th for his 15th save.
REDS 4, PADRES 2
SAN DIEGO (AP) — All-star Jay Bruce and Ryan Ludwick hit consecutive home runs, leading the Reds to the victory.
Bruce and Ludwick connected two pitches apart in the fourth inning to give Cincinnati a 3-0 lead.
Johnny Cueto (10-5) allowed two runs and seven hits in 5 2-3 innings for the Reds. Sam LeCure, Sean Marshall, and Aroldis Chapman combined for 3 1-3 innings of hitless relief, with Chapman earning his 11th save.
The Reds hit seven home runs in winning the final three of the four-game series. Cincinnati finished 6-5 on its longest road trip of the season.
Jason Marquis (1-5) gave up three runs and seven hits in five innings for San Diego. Cameron Maybin made an outstanding catch in centre field to rob Toronto's Joey Votto of a possible homer.