Catcher Russell Martin said the Pirates aren't playing poorly, they're just running into a team that's suddenly gotten hot.
"The Cardinals are just playing a little better this series," Martin said after a 5-2 loss on Wednesday night. "They're getting some timely hits and that's all it boils down to.
"You don't need to dissect it more than that."
The NL Central is getting tight heading into the All-Star break with the Milwaukee Brewers leading the Cardinals by two games and the fourth-place Pirates are just 4½ games back.
"We know we're going to contend all the way through and we're going to fight all the way through. None of that's going to change," Martin said. "It's always nice to rattle off some wins before the All-Star break, but if it doesn't happen, it doesn't matter."
Lance Lynn reached double figures in wins before the All-Star break for the third straight year and Kolten Wong homered for the second straight game for the Cardinals.
Matt Adams had three hits and two RBIs for the Cardinals, who will go for a four-game sweep over the division rival they beat in the postseason last fall on Thursday, although they might have to do it without All-Star catcher Yadier Molina.
Molina was removed for a pinch-hitter in the third inning with a sprained right thumb from sliding into third base and will be re-evaluated before the finale. He caught another half-inning before leaving the game.
Neil Walker homered and doubled for Pittsburgh, which had won 12 of 15 entering the series and dropped the first two on game-winning, ninth-inning homers by Adams and Wong.
Rookie Brandon Cumpton (3-3) started in place of injured Gerrit Cole and was charged with four runs and nine hits in 3 1-3 innings.
"I was just falling behind and not executing pitches well at all," Cumpton said. "I was just missing up with stuff."
Lynn (10-6) allowed two runs and six hits in 6 2-3 innings and has 32 wins before the All-Star break his first three seasons in the rotation. The right-hander is tied for most pre-All-Star wins with Detroit's Max Scherzer over that stretch and is the first Cardinals pitcher to do it in three straight seasons since Hall of Famer Bob Gibson totaled 34 wins from 1968-70.
Walker's 12th homer leading off the second was the first allowed by Lynn at home this season.
Adams' two-run double in the first put the Cardinals ahead to stay and he added two singles to give him 12 in the last six games. Wong hit his fourth homer off Justin Wilson in the eighth.
Molina was voted to his sixth straight All-Star team Sunday and is a starter for the fourth time. He slid feet-first into third base advancing on a groundout in the second and came up shaking the right hand after planting it a bit for balance.
Matt Holliday had two hits, two walks and an RBI and Jhonny Peralta had an RBI double for St. Louis.
Cumpton was in constant trouble and the Cardinals missed a chance to bust it open by stranding nine runners the first four innings.
"I was happy with limiting the damage, but it was pretty disappointing to go out there and leave the bullpen out there to dry," Cumpton said. "They ate up a lot of innings tonight."
Trevor Rosenthal worked the ninth for his 27th save in 31 chances. Peter Bourjos made a leaping catch for the final out at the wall in center field with a man on to rob Russell Martin of extra bases.
NOTES: Attendance of 43,941 was the 28th sellout for the Cardinals including five of the first six games of a seven-game homestand. ... Shelby Miller (7-7, 4.15) will try to beat the Pirates for the third straight start this season Thursday and will oppose Edinson Volquez (7-6, 3.88). Volquez is 3-0 his last three starts allowing two earned runs in 21 innings, but is 3-6 with a 5.58 ERA against the Cardinals. ... Cole was placed on the 15-day DL with right lat soreness retroactive to July 5. ... The Cardinals have won 10 of the last 12 at home against Pittsburgh.