PITTSBURGH -- The San Diego Padres are spoiling all the Pittsburgh Pirates' fun.
Logan Forsythe tied the game with a pinch-hit RBI single and Rene Rivera followed with the game-winning single in the ninth inning as the Padres rallied against closer Mark Melancon for a 3-2 victory on Wednesday night at PNC Park.
The Padres have won the first three games of the four-game series, improving to 31-10 all-time at PNC Park, and will go for the sweep Thursday afternoon against the Pirates, who are trying to reach the postseason for the first time since 1992.
The Pirates entered the night one game behind the St. Louis Cardinals, who played at Colorado, in the division race and 1 1/2 games in front of the Cincinnati Reds, who played at Houston, in the division and wild-card races. The Pirates had a 4 1/2-game lead for the second wild card on the Washington Nationals, who hosted Atlanta.
Jeff Gyorko led off the ninth with a single but Melancon came back to get Chase Headley on a fly out and then struck out Tommy Medica. However, pinch-hitter Chris Denorfia kept the inning alive by lining a single to right.
Forsythe grounded a single to right to score pinch-runner Andrew Cashner and Rivera followed by knocking in Denorfia with the winning run. That gave the Padres 14 wins in their last 15 games at PNC Park.
Melancon suffered his third blown save in 19 chances.
The Pirates pulled ahead 2-1 in the seventh inning when Andrew McCutchen blasted a two-run home run to the seats in right-center off Tyson Ross, who was working on a one-hitter.
McCutchen is hitting .407 in September and the home run gave him three straight seasons with at least 20 homers and 20 stolen bases. Barry Bonds (1990-92) is the only other player in Pirates history to accomplish that feat.
Dale Thayer (3-5) retired the final two batters in the eighth for the win. Huston Street pitched a 1-2-3 ninth for his 31st save in 32 opportunities.
Pirates starter Charlie Morton was outstanding over eight innings but wound up with a no-decision. He allowed one run and two hits while striking out nine and walking three.
Morton tied a career high in strikeouts that he set on Oct. 2, 2010, at Florida.
The only hits off Morton were singles by Headley in the fourth inning and Reymond Fuentes in the fifth. Headley extended his hitting streak to six games.
Justin Morneau had the Pirates' other two hits with a pair of singles.
Ross (3-9) remained winless since Aug. 10 despite a fine outing. He gave up two runs and three hits in seven innings with seven strikeouts and no walks.
NOTES: San Diego RF Kyle Blanks was not in the lineup after being removed from Tuesday's game in the sixth inning because of illness. ... Padres 1B Yonder Alonso admitted Wednesday that he might not return this season because of a sore right hand that has caused him to miss 17 consecutive games. ... Pittsburgh C Russell Martin got the night off after catching eight of the previous nine games. He is just 4-for-40 (.100) in September. ... Pirates RHP Gerrit Cole (8-7, 3.33) will face San Diego RHP Ian Kennedy (6-9, 4.85) on Thursday afternoon in the finale of the four-game series.