PITTSBURGH (AP) -- Garrett Jones hit a game-ending RBI single to cap a two-run rally in the ninth inning and the Pittsburgh Pirates avoided a record-setting loss at least for one day, beating the St. Louis Cardinals 6-5 Sunday to stop a nine-game skid.
The Pirates, who would have assured themselves of a record 17th consecutive losing season with a loss, won after falling behind 5-4 on Rick Ankiel's pinch-hit homer off Jesse Chavez (1-4) in the top of the ninth. Despite allowing the homer, Chavez gained his first victory in the majors.
No team in any of the four major American pro team sports -- major league baseball, the NFL, NBA or NFL -- has had 17 consecutive losing seasons.
Cardinals closer Ryan Franklin (2-2) came in to try for his 38th save in 40 opportunities, only to give up singles to Jason Jaramillo, Andrew McCutchen and pinch-hitter Ryan Doumit in a span of four batters, although Jaramillo was forced at second on a failed sacrifice.
Left-hander Trever Miller came in to face the lefty-hitting Jones with runners on first and second and one out, but the rookie hit a line drive between left fielder Ankiel and center fielder Colby Rasmus for the Pirates' first victory since beating the Phillies 3-2 on Aug. 27.
The Cardinals were denied their second three-game sweep in a month in Pittsburgh while losing for only the sixth time in 28 games since taking control of the NL Central on Aug. 7. They still lead the Cubs by 11 1/2 games.
The game began with a misplay that epitomized all that's gone wrong with a Pirates franchise that, for its first 100 seasons of existence, was one of baseball's most consistent winners.
With Julio Lugo on third after his leadoff double and a sacrifice, catcher Jaramillo's throw back to the mound following a pitch to Albert Pujols sailed far over Paul Maholm's head for an error that scored Lugo.
St. Louis later took a 4-1 lead on Yadier Molina's RBI single in the fourth and run-scoring singles by Pujols and Ryan Ludwick in the fifth. Pujols drove in five runs during the series, including a pinch-hit homer in the 10th inning of St. Louis' 2-1 victory Saturday night.
The Pirates came back to tie it with a three-run sixth against Joel Pineiro, who failed to win his ninth consecutive decision while giving up four runs and eight hits in six innings. Brandon Moss doubled ahead of Ronny Cedeno's two-run single and Jaramillo's run-scoring single. The Cardinals had won Pineiro's last 11 starts.
(Copyright 2009 by The Associated Press. All Rights Reserved.)