Ryan Ludwick hit a pair of two-run homers, Adam Wainwright pitched eight strong innings and the St. Louis Cardinals salvaged a split by beating the Chicago Cubs 4-2 in the nightcap of Sunday's doubleheader.

Wainwright improved to 3-0 against the Cubs this season and St. Louis leads the NL-Central by 2 1/2 games heading into the All-Star break.

In the opener, Carlos Zambrano homered for the third time this season and earned a win with six solid innings as the Cubs beat the Cardinals 7-3.

The second game featured some unusual maneuvering by Cubs manager Lou Piniella in the ninth inning. With no outs and the bases loaded, Piniella moved left-handed reliever Sean Marshall to left for one batter and moved him back to the mound to face left-handed hitter Skip Schumaker.

Right-hander Aaron Heilman struck out Brendan Ryan with the bases loaded with Marshall in left. Schumaker was pinch-hit for by Jarrett Hoffpauir, and Marshall struck out him. Left fielder Reed Johnson made a diving catch, though replays showed he appeared catch the ball on a short-hop, on Colby Rasmus' fly to end the inning.

Ludwick also had a double in the eighth to finish the doubleheader 5 for 8 with four RBIs. He had four extra base hits on the day. Ludwick is batting .455 during a nine-game hitting streak.

Cardinals closer Ryan Franklin struck out the side in the ninth for his 21st save in 22 chances.

Cubs starter Randy Wells (4-4) handled Albert Pujols in the nightcap, but couldn't get out Ludwick. Wells got Pujols to hit into a doubleplay with runners on first and second and no outs in the first inning. Ludwick followed with a two-run shot to center.

Wainwright (10-5) allowed two runs and scattered seven hits. He struck out five and walked three as the Cardinals split the four-game series.

Wells gave up a leadoff single to Rasmus in the sixth inning. Pujols followed with a groundout to third, but Ludwick tagged Wells again to put the Cardinals up 4-1. It was Ludwick's 15th of the season and his second multihomer game of the season.

Pujols was 1 for 8 with two RBIs for the Cardinals in the doubleheader.

Wells, who won his last four decisions, gave up four runs on seven hits in seven innings in the first game. He struck out four and walked three.

The Cubs got a run off Wainwright in the first inning on Derrek Lee's RBI single. Milton Bradley hit a two-out RBI double in the sixth to score Aramis Ramirez from first cut the lead to 4-2.

In the first game, Zambrano homered for the 19th time in his career, tops in franchise history for pitchers, but isn't interested in a regular opportunity to hit.

"My job is to pitch. That's the thing I know best," he said. "I think being an everyday player, hitter it makes it tough because pitchers study you and know how to pitch. If they figure out how to pitch to me every day I don't think I would hit that many home runs."

Micah Hoffpauir had a three-run homer for the Cubs and Zambrano (5-4) allowed three runs and five hits.

St. Louis starter Kyle Lohse (4-5), who was activated from the 15-day disabled list before the game, struggled in his first appearance since leaving an outing against Cincinnati on June 3 because of a strained right forearm.

"Hoffpauir's first pitch (was) a curve," said Lohse, who allowed four runs and eight hits in five innings. "It wasn't a bad pitch but he jumped all over it. As the game went on I pitched pretty well."

St. Louis rallied to tie it at 3 but Zambrano hit a solo drive in the fourth to give the Cubs the lead again.

"He swings a big bat. He can hit," Theriot said. "It's no surprise. I think everybody knows if they throw one way where he is swinging he is going to hurt you."

Zambrano settled down after a slow start, striking out six of the last 10 hitters he faced. He finished with seven Ks and two walks.

NOTES: In the fifth inning of Game 2, with Wainwright at first base, Ryan hit into what appeared to be a doubleplay, but Wainwright deflected the ball with his right hand on the turn by Theriot. Wainwright did not show any signs of an injury to his hand. ... Cardinals third base coach Jose Oquendo missed the doubleheader to manage the World Team in the Futures Game in St. Louis. Joe Pettini took his place at third.