PITTSBURGH (AP) -- Pirates rookie Neil Walker drove in three runs and last-place Pittsburgh prevented Adam Wainwright from becoming the majors' first 18-game winner, holding off a ninth-inning rally to beat St. Louis 4-3 on Tuesday night.
The Cardinals, down 4-2 when the ninth 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 in succession. Meek converted only his second save in eight opportunities.
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 Milwaukee on Aug. 18.
St. Louis had won three in a row since dropping five straight, but couldn't pick up any ground on NL Central leader Cincinnati or wild-card leader Philadelphia.
Pittsburgh won for only the third time in 16 games.
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.
Joel Hanrahan (3-1) pitched 1 1-3 scoreless innings for the victory in relief of Paul Maholm.
Holliday's two-run homer -- his 22nd -- followed Albert Pujols' two-out single in the first off and quickly put the Cardinals up 2-0. It was the second successive night a multi-run homer gave St. Louis the lead in the first inning; Pujols hit a three-run shot as the Cardinals won 10-2 on Monday.
This time, St. Louis didn't add on runs. Maholm, the loser of three straight and five of six, settled down to keep the Cardinals scoreless after that until being lifted with one on and two outs in the seventh. He worked out of a bases-loaded jam in the fourth by getting Brendan Ryan to ground out.
Maholm gave up seven hits over 6 2-3 innings, 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.
Wainwright immediately got into trouble in the seventh when Ronny Cedeno doubled. Wainwright retired the next two batters, but Tabata walked and stole second, 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.
NOTES: The Pirates were held to two rune 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 3B 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. ... Cardinals RHP Jason Motte (sprained right shoulder) could begin a rehabilitation assignment Wednesday. ... Despite the loss, St. Louis is 53-27 in Pittsburgh since 2001.
(Copyright 2010 by The Associated Press. All Rights Reserved.)