Todd Frazier drove in all three runs for the NL Central-leading Reds, who were seeking their first series win in Philadelphia since 2006.
The Phillies tied it in the eighth on Jimmy Rollins' sacrifice fly and won it on Mayberry's hit off Alfredo Simon (2-2) to split the four-game set. They took over sole possession of third place in the NL East for the first time since April.
Raul Valdes (3-2) worked a scoreless 11th for the win. Philadelphia's bullpen pitched five hitless innings.
In a matchup between NL Cy Young Award candidates, neither Johnny Cueto nor Cole Hamels was sharp.
CARDINALS 13, ASTROS 5
ST. LOUIS (AP) — David Freese's three-run homer snapped the Cardinals' seven-game longball drought and St. Louis beat Houston to complete a three-game sweep.
Freese and Matt Holliday each had four RBIs and Allen Craig had three hits and three RBIs. The Cardinals shrugged aside a 4-0, fourth-inning deficit and sent Houston to its seventh straight loss.
The Astros are 0-4 while getting outscored 32-8 since interim manager Tony DeFrancesco replaced Brad Mills as leader of the stripped-down roster. Houston has won just seven of its last 50 overall. The Astros were swept for the third time this month and 12th overall.
Holliday's three-run double in the fifth was the go-ahead blow. Astros rookie Dallas Keuchel (1-6) was charged with five earned runs in four-plus innings.
Jake Westbrook (13-9) won for the fourth time in five starts. The Cardinals totalled 17 hits and were 10 for 14 with runners in scoring position.
ROCKIES 1, METS 0
NEW YORK (AP) — Collin McHugh pitched two-hit ball over seven scoreless innings for New York in his major league debut, but Colorado completed its second straight four-game sweep at Citi Field.
Rookie centre-fielder Jordany Valdespin misplayed Tyler Colvin's leadoff drive in the eighth into a game-changing triple. Chris Nelson hit an RBI single through the drawn-in infield.
The last-place Rockies tied a season high with their fifth straight win and completed their second four-game sweep in two years at Citi Field.
McHugh pitched masterfully in place of injured Johan Santana with nine strikeouts and one walk. But after he left, the Rockies broke through quickly against Bobby Parnell (2-3).
Rex Brothers (8-2) pitched two innings for the win. Matt Belisle, Colorado's fifth pitcher, got his first save since June 22, 2010.
The punchless Mets went 0 for 10 with runners in scoring position and were held to two runs or fewer for the sixth straight game, the first time that's happened since a streak of seven in a row in September 1982, according to STATS LLC. The Mets dropped to 11-28 since the All-Star break, which includes a 2-14 mark at home.
GIANTS 5, BRAVES 2
SAN FRANCISCO (AP) — Barry Zito took a three-hit shutout into the ninth inning and Hector Sanchez's two-run double highlighted a four-run fifth for San Francisco in its fourth straight win.
Fresh off a sweep at Los Angeles, the NL West leaders won behind Zito (10-8), who allowed five hits, struck out five and walked three before Freddie Freeman's two-run double off reliever Jeremy Affeldt broke up the shutout.
With two runners on, Sergio Romo got pinch-hitters Jason Heyward and Juan Francisco to ground out for his sixth save.
Hunter Pence, Brandon Belt and Pablo Sandoval all drove in runs to chase Atlanta starter Tommy Hanson (12-6) after 4 1-3 innings. Hanson gave up five hits and five runs while striking out four and walking three.
San Francisco has won nine of 12 to take a three-game lead over the Dodgers in the division.