Updated

Joe Kelly pitched six scoreless innings, Yadier Molina hit a two-run homer and the St. Louis Cardinals beat the Chicago Cubs, 4-0, in the second test of a three-game series.

Kelly (4-3) gave up four hits while striking out six and walking three for the Cardinals, who moved within two games of the Pirates for first place in the NL Central.

"When he goes out there with that kind of confidence, it just transfers over to everybody else. And he's getting better," Cardinals manager Mike Matheny said of Kelly.

Matt Carpenter and Carlos Beltran each drove in a run for St. Louis.

Travis Wood (7-10) allowed four runs on four hits over 5 1/3 innings for the Cubs, who have lost five of six.

Chicago's best chance to score came in the third inning. With the bases loaded and one out, Anthony Rizzo struck out swinging and Nate Schierholtz grounded out to end the threat.

Wood retired the first nine batters he faced before giving up back-to-back doubles to Carpenter and Beltran in the fourth. Beltran's double down the left-field line plated Carpenter.

The Cardinals tacked on another run in the fifth. Jon Jay doubled, Pete Kozma walked and Kelly was hit by a pitch to load the bases with one out. Cubs shortstop Starlin Castro then caught a pop up by Carpenter in short left field. Castro put his head down and hesitated to throw home, looking as if he thought the inning was over. Castro's mental mistake allowed Jay to score on the play. It also resulted in Castro being pulled from the game.

"I knew the outs and everything, but I put my head down and made a mental mistake," Castro said. "I don't want to make any excuses for that. It's my mistake, and that's why I paid for that -- that's why I came out of the game. I feel really, really bad that it happened, especially with Woody pitching good."

Molina's homer in the sixth gave St. Louis a four-run cushion. Matt Holliday was hit by a pitch and crossed the plate on Molina's blast over the wall in left-center field.

The Cubs stranded a runner on third in the sixth.

Seth Maness, Randy Choate and Michael Wacha each tossed a scoreless inning of relief for the Cardinals.

Game Notes

St. Louis is 8-7 against Chicago this season ... Kelly hasn't lost since June 5 against Arizona. He's 4-0 over his last 12 appearances ... Wood fell to 3-4 lifetime against the Cardinals ... St. Louis recalled pitcher Tyler Lyons from Triple-A Memphis and optioned pitcher Sam Freeman to Memphis.