PITTSBURGH -- Adam Wainwright doesn't give up many runs and the Pittsburgh Pirates don't score many. The St. Louis Cardinals had every reason to expect a two-run lead to hold up against an opponent whose main goal is avoiding its worst season since the 1950s.
Somehow it didn't happen, and the Cardinals wound up instead with a difficult-to-take loss.
Pirates rookie Neil Walker drove in three runs and last-place Pittsburgh prevented Wainwright from becoming the majors' first 18-game winner, holding off a late rally to beat St. Louis 4-3 on Tuesday night.
The Cardinals, down 4-2 when the ninth inning started, loaded the bases with one out and a run in on Jon Jay's single, but Evan Meek got Matt Holliday and Felipe Lopez to pop up. Meek converted only his second save in eight opportunities, though he rarely gets such chances in the ninth.
"It was nice to go out there and seal the deal, even if it was a little dramatic," Meek said. "A situation like that, you've just got to go a pitch at a time and try to get three outs, and it turned out in our favor."
That hasn't happened much for the Pirates, who had won only two of 15 and were 1-5 against St. Louis. The Pirates are on pace for their worst season since they lost 112 games in 1952, which probably made the loss even worse for the Cardinals.
With one out and Holliday coming up, third base coach Jose Oquendo chose not to gamble by sending Randy Winn home from second on Albert Pujols' single off third baseman Pedro Alvarez's glove. Winn wound up being stranded at third.
"In that situation, you've got to be 100 percent sure," Winn said. "There's nothing worse than me getting thrown out instead of having the bases loaded and one of the best hitters in the game coming up."
Wainwright (17-8) took a 2-0 lead into the sixth but couldn't hold it while failing for the second straight start to win his 18th. He lost 3-2 to the Milwaukee Brewers on Aug. 18.
"At this point of the season we've got to win every game we can, and if I even hold them to one [run] right there we probably win that game," Wainwright said. "You can put it on me."
Instead, Wainwright gave up four runs and seven hits in seven innings, or as many runs as the right-hander had surrendered over 30 innings in his previous four starts.
"I felt good from the first pitch on," Wainwright said. "I had good stuff; I just didn't put a few guys away when I needed to."
Holliday's two-run homer -- his 22nd -- followed Pujols' two-out single in the first off and quickly put the Cardinals up 2-0. Pujols' three-run shot in the first the night before got St. Louis going in a 10-2 victory.
This time, the Cardinals didn't add on runs. Maholm, the loser of three straight and five of six, settled down to keep the them scoreless after that until being lifted with one on and two outs in the seventh. He gave up seven hits, striking out four and walking one.
The Pirates managed two singles off Wainwright while being shut out for five innings, only to tie it in the sixth. Rookie Jose Tabata's RBI triple -- his 53rd hit since the All-Star break -- scored Andrew McCutchen, who doubled with one out. Walker's single to right tied it, though the Pirates couldn't score again in the inning despite loading the bases.
"We felt like we had a good thing going, we had the momentum and we were going to try to use it," Walker said. "We were able to put something together in the seventh and get the lead."
Ronny Cedeno doubled to start the seventh. Wainwright retired the next two batters, but Tabata walked and stole second without opposition, putting him in position to score on Walker's two-run single to center. Walker is batting .327 (50-for-153) in PNC Park during his first full season in the majors.
The Pirates had been held to two runs or fewer in 11 of their previous 12 games, losing all but two.
Holliday is 2-for-16 against Maholm, with both hits being homers. ... Pujols has six hits in the first two games of the three-game series. He is 18-for-30 (.600) in his career against Maholm. ... Pirates third base coach Tony Beasley sang the national anthem. ... Wainwright had been 4-0 against Pittsburgh the last two seasons. He lost for the first time in six decisions at PNC Park. ... Despite the loss, St. Louis is 53-27 in Pittsburgh since 2001.