Ohlendorf hurled six innings and gave up one run on two hits. He recorded five strikeouts and upped his record to 4-3.
"Each start, he's getting a little better," Pirates manager John Russell said. "Again, he's still young in his approach as a Major League starter, because he hasn't started that many games, but he continues to make improvements each start. He's keeping the ball down, and he's getting a lot of ground balls and attacking the zone. He's done a nice job for us."
"Pretty much all of my pitches felt good," Ohlendorf reported. "The first two starts against them I threw mostly sinkers and had pretty good success with that. Today, I tried to mix it up more, and I threw more four-seamers, and my slider was good, especially towards the end, and I had a good changeup also."
Cardinals right-hander Joel Pineiro was tagged with the loss, falling to 4-3 on the season. He allowed five runs on 11 hits in six innings of work.
Pittsburgh jumped out to a 1-0 lead in the first inning. Freddy Sanchez doubled down the left-field line. With two outs, Adam LaRoche stroked a line drive off the right-field grandstand that at first was ruled a home run. After an instant-replay review, the home run was overturned, and LaRoche was credited with an RBI double.
"I thought it hit the fence," LaRoche opined. "Then they said it was a homer, and I thought maybe I missed it. The second-base umpire is the one that told me it was a home run. Before they reviewed it, I thought I was going back out there. I wasn't surprised -- I would have been shocked if it stayed a home run."
The situation marked the first time since the system was instituted in Major League Baseball last year that a home run was taken away by instant replay.
The Cardinals knotted the score at 1 in the top of the fourth inning on Skip Schumaker's first home run of the season.
The Pirates regained the lead, 2-1, in the bottom of the fourth on back-to-back doubles by a suddenly red-hot Brandon Moss and Jack Wilson.
"Adam LaRoche has been swinging the bat well," Russell said. "He had a tough go on the road. He hit some balls hard, but couldn't find a hole, and he's swung the bat well here at home all year. Moss now is hopefully relaxed enough to where he's seeing the ball better and putting a good swing on it. It's nice to have those guys contributing."
Pittsburgh broke the game open in the sixth inning as Robinzon Diaz was hit by a pitch and Andy LaRoche singled. Diaz scampered home on a fielder's choice groundout by Moss. With two out, Nyjer Morgan singled home Moss and Wilson, increasing the Pirates' lead to 5-1.
Moss is hoping that the hit parade continues.
"A good sign tonight that my luck is changing -- that first at-bat when I got that hit -- that thing took seven hops, but somehow made it through the infield," Moss said. "That's good, and it made me feel a lot more comfortable out there tonight. Any time you get a hit like that, maybe your luck is changing. I definitely felt a lot better."
The Pirates' offense that was dormant during a recent eight-game losing streak has now scored 12 runs in two wins over the Cardinals.
"Our luck has been so far south the past eight or nine games, we were all due to come back around," Moss said. "It's a good thing that we're all clicking together, and our pitching -- they just keep on pitching well."
The Pittsburgh bullpen closed out the game. Tyler Yates pitched a scoreless seventh and John Grabow a perfect eighth. Jesse Chavez ran into some trouble in the ninth, putting runners on first and second with one out, forcing closer Matt Capps to relieve him. But after Capps allowed an RBI single to the menacing Albert Pujols, he got Chris Duncan to ground into a double play to record his sixth save of the season.
After enduring an eight-game skid and dropping 12 of 13, the Pirates have now won two successive contests.
"If we can get top-to-bottom going in the batting order like we should go," said Adam LaRoche, "and the pitchers doing what they can do, again, this can be a special team, if we can stay out of the 10- and 12-game slumps like we are just getting out of."
George Von Benko is a contributor to MLB.com. This story was not subject to the approval of Major League Baseball or its clubs.