Updated

PITTSBURGH (AP) — Yadier Molina doubled in the go-ahead run in the ninth inning with his fourth hit, and the St. Louis Cardinals took advantage of several Pittsburgh defensive lapses and a key baserunning mistake to beat the Pirates 4-3 on Friday night.

Joe Mather, pinch running in the ninth after Matt Holliday singled off Evan Meek (1-1) for his fourth hit, arrived well behind the throw as he tried to steal second on a pitchout, but managed to sneak his right hand in ahead of Aki Iwamura's tag. Molina followed with his double to the right-field wall.

Ryan Franklin (2-0) got the final four outs for the victory despite throwing a tying wild pitch in a wild eighth inning, when five of the Pirates' six batters reached base but only one scored.

After Andy LaRoche and Andrew McCutchen singled off Jason Motte in the eighth, LaRoche was caught in a rundown between third and the plate on Garrett Jones' grounder. LaRoche and McCutchen both ended up on third, and catcher Molina alertly tagged both out as LaRoche — who was entitled to the bag — momentarily took his foot off the base.

Cardinals ace Chris Carpenter was denied his 11th consecutive victory in 12 starts against Pittsburgh since June 2004 — and a 5-0 start this season — when the Pirates tied it. Carpenter struck out eight and walked none over seven innings, allowing Lastings Milledge's RBI single in the fourth and Ryan Doumit's run-scoring double in the sixth.

The Cardinals, 11-5 against Pittsburgh the last two seasons, were coming off three consecutive losses in Philadelphia while the Pirates had swept three from the Cubs.

St. Louis scored twice in the first against Zach Duke with the help of a defense that couldn't make plays regardless of where it was positioned.

The Pirates employed radical infield shifts against Ryan Ludwick and Molina, and both singled by driving the ball into right field through the hole where second baseman Iwamura normally plays. When the Cardinals did hit the ball to a fielder, shortstop Ronny Cedeno threw wildly on Holliday's grounder — setting up Molina's two-run single.

Pittsburgh dropped the shift in later innings, although it positioned three infielders between third and second when Albert Pujols batted. He went 0 for 5 to end an 11-game hitting streak.

Third baseman LaRoche misplayed Molina's grounder in the sixth for an error, and Skip Schumaker hit a two-out single to make it 3-1.

The Cardinals didn't score in the seventh despite getting three consecutive singles. Holliday slid past home plate and was tagged out on Molina's one-out hit.

NOTES: The Cardinals left 13 on base. ... Despite going hitless, Pujols has a .382 career batting average in Pittsburgh. ... The gametime temperature was 82. It is expected to be about 30 degrees cooler for Saturday night's game. ... Pittsburgh's Jeff Clement was hitless in 19 at-bats before getting a one-out single in the ninth. ... Cardinals INF Felipe Lopez's inflamed right elbow will be examined Monday in St. Louis. He has been on the disabled list since April 26. ... McCutchen is batting .462 (12 for 26) in the first inning.