The Cardinals outscored Pittsburgh 26-10 overall in taking the NL Central lead.
The Pirates arrived at Busch Stadium this weekend with a 1½-game division lead and a chance to cement their first winning season since 1992. They left trailing the Cardinals by 1½ games and still stuck on 81 victories.
Wacha (3-0) allowed two hits and walked two, both of which were erased on double plays. He struck out two and never had more than one runner on at a time.
Pittsburgh starter Charlie Morton (7-4) left with discomfort in his left foot in the second inning. He allowed five runs on six hits and two walks in 1 2-3 innings.
PHILLIES 3, BRAVES 2
PHILADELPHIA -- Darin Ruf hit a tiebreaking solo homer in the eighth inning to back a strong outing by starting pitcher Cole Hamels and lift the Phillies to a victory and three-game sweep over the Braves.
Hamels (7-13) gave up just two hits, both homers, and two runs over eight innings. He struck out nine and walked two. He retired the side in order four times.
B.J. Rosenberg earned his first career save with a perfect ninth inning.
David Carpenter (3-1) took the loss for allowing Ruf's homer in the eighth.
Evan Gattis hit two solo home runs for the Braves. His first, in the second inning, traveled 480 feet to center field. In the seventh, he tied the game with a long ball that went deep into the left-field bleachers. It was his first career multi-homer game.
GIANTS 3, DIAMONDBACKS 2, 11 innings
SAN FRANCISCO -- Angel Pagan singled home the winning run in the 11th inning to lead the Giants past the Diamondbacks.
Javier Lopez (3-2) got the win. Sanchez also drove in a run for the Giants, who split the series with Arizona.
Eric Chavez and A.J. Pollack each drove in runs for the Diamondbacks, who had won three of their last four.
Giants starter Madison Bumgarner threw six shutout innings, allowing four hits. He struck out nine and did not walk a batter. Bumgarner remains winless over his last seven starts.
PADRES 5, ROCKIES 2
SAN DIEGO -- Pinch-hitter Nick Hundley delivered a three-run double in the seventh inning that lifted the Padres to a win over the Rockies.
San Diego has won five of six games. The Rockies have dropped five of six.
BREWERS 3, CUBS 1
Gallardo (11-9) allowed one run and three hits. He is 3-0 with a 1.35 ERA in five starts since coming back from a hamstring injury that put him on the disabled list.
Bianchi keyed a three-run seventh with a two-run single.
Scott Baker pitched five shutout innings for the Cubs in his first start of the season following Tommy John surgery last year.
NATIONALS 6, MARLINS 4
MIAMI -- Stephen Strasburg got past a shaky start and pitched six innings to earn his first victory in nearly a month as the Nationals beat the Marlins.
Strasburg (7-9) struck out seven and allowed four runs and four hits. He also hit a batter, threw a wild pitch and had two balks. It was his first win since Aug. 11 against Philadelphia.
Rafael Soriano pitched the ninth for his 39th save in 45 chances.
Wilson Ramos and Ian Desmond each had three hits and drove in two runs for the Nationals. Ryan Zimmerman and Ramos homered and Denard Span extended his hitting streak to 19 games, the longest active streak in the majors.
REDS 3, DODGERS 2
Cozart, who had extended his career-high hitting streak to 13 games earlier, started the rally with a one-out single to left off Ronald Belisario (5-7). Hanigan lined the next pitch past left fielder Carl Crawford to the wall, and Cozart beat shortstop Hanley Ramirez's relay throw with a headfirst slide.
Aroldis Chapman (4-5) pitched a perfect ninth with two strikeouts to get the win, which completed the Reds' first sweep of a three-game series against the Dodgers in Cincinnati since June 12-14, 1992.
Jay Bruce hit two home runs for the Reds, who went into the game in third place in the NL Central, two games behind first-place St. Louis, which beat second-place Pittsburgh earlier Sunday.
Copyright 2013 by The Associated Press
This story is from ESPN.com's automated news wire. Wire index
MORE MLB HEADLINES
- Sources: Padres keep dealing, get J. Upton
- Yankees trade Prado to Miami, get P Eovaldi
- Giants fill Sandoval hole, trade for McGehee
- Report: Dodgers pass Yanks in owing most tax