PITTSBURGH -- The Pittsburgh Pirates, heading to a record-tying 16th consecutive losing season, had reason to celebrate Saturday night.
Manager John Russell was happy to see it.
"To see the excitement after the game, you realize the guys are still into it," Russell said.
Chris Perez (3-3), the seventh Cardinals pitcher, retired the first two batters in the 12th before walking LaRoche. Moss then lined a 3-2 pitch past Skip Schumaker in center field to score the winning run and end the 3-hour, 54-minute game.
"It feels good, especially the way I've been swinging the bat," said Moss, who went 1-for-5 and is hitting .179 (7-for-39) in September.
Outfielder Nyjer Morgan sparked the Pittsburgh offense with three hits and two runs.
"I enjoyed it. I gave [Moss] a couple of good shots in the ribs," Morgan said, laughing. "To have everyone out there, it was a beautiful thing to see. To have everyone come together, it's fun."
Ryan Doumit had two hits and three RBIs, Freddy Sanchez had two hits and two runs, and LaRoche added two RBIs for the Pirates, who have scored a combined 17 runs in beating St. Louis two straight games.
The offensive outburst followed a stretch where the Pirates lost 17 of 20 games.
"Everyone is swinging the bats better," Russell said. "For us to score runs, we can't rely on just a couple of guys."
Pittsburgh also got outstanding work from its bullpen. Seven relievers limited St. Louis to five hits in eight innings. Craig Hansen (1-3) tossed a scoreless inning to pick up the win.
Felipe Lopez homered for St. Louis, which has lost four in a row.
The Cardinals, whose playoff hopes continue to fade, trail National League wild-card leader Milwaukee by five games with 14 to play.
Pittsburgh scored four times in the fifth to tie the game 6-6. Nate McLouth drove in a run with a double, Doumit hit a two-run double and LaRoche added an RBI single to chase St. Louis starter Adam Wainwright.
Wainwright, who had pitched effectively in four starts since coming off the disabled list, went four innings and allowed six runs and nine hits. He also had two singles.
The right-hander said he tired out quickly on a humid night at PNC Park.
"By the third inning, I was completely gassed," he said. "I can't explain it. I usually feel pretty good going out seven, eight, nine innings."
Pittsburgh starter Ian Snell lasted four innings and gave up five earned runs and nine hits. The right-hander threw seven shutout innings in his last appearance against St. Louis August 19.
Lopez, who has started four of the past five games at third base in place of the injured Troy Glaus, hit a two-run homer off Snell in the fourth that put St. Louis ahead 6-2. Lopez also singled in the second.
Schumaker and Aaron Miles had two hits for the Cardinals.
Jeff Karstens (abscessed tooth) missed his scheduled start Saturday for Pittsburgh. The right-hander instead will pitch Tuesday against Los Angeles. Snell was moved up a day, and Jason Davis will start Sunday in the series finale. ... Morgan has reached base safely in all 17 of his starts since being recalled from Triple-A Indianapolis on Aug. 19. ... Sanchez (blurred vision) returned after missing three games. ... The last-place Pirates improved to 9-7 against the Cardinals and clinched the season series. The teams play for the final time Sunday. ... St. Louis is 1-8 in its past nine road games.