PITTSBURGH -- The San Diego Padres insist they aren't trying to spoil the Pittsburgh Pirates' magical season, even though it seems that way.
Logan Forsythe tied the game with a pinch-hit RBI single, and Rene Rivera followed with the game-winning single in a two-run ninth inning as the Padres rallied against closer Mark Melancon with four consecutive singles for a 3-2 victory 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. They will go for the sweep Thursday afternoon against the Pirates, who are trying to reach the postseason for the first time since 1992.
"Every game is big all season long," San Diego starting pitcher Tyson Ross said. "You play 162 of them, and they all matter. It's just exciting to be in a tight game and win. It really doesn't matter who it's against."
The Pirates entered the night one game behind the St. Louis Cardinals in the National League Central race and 1 1/2 games in front of the Cincinnati Reds in the division and wild-card races. The Cardinals played the Rockies in Colorado, while the Reds played the Astros in Houston.
The Pirates have a five-game lead for the second wild card over the Washington Nationals, who lost to the Atlanta Braves.
"The loss does hurt a little bit, but at the same time, you've got to treat it like any other game, show up tomorrow and be ready to go," Pirates center fielder Andrew McCutchen said.
Jedd Gyorko led off the San Diego 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, who pitched a one-hit shutout against the Pirates on Monday night. Rivera followed by knocking in Denorfia with the winning run, giving the Padres 14 wins in their past 15 games at PNC Park.
"We put right-handed hitters up there knowing that Melancon is so tough on lefties," San Diego manager Bud Black said. "We tried to get him to make some pitches out over the plate and not do too much with them, hit them to right side of the diamond because you're only going to hit the ball off the end of the bat if you try to pull him."
Melancon (2-2) suffered his third blown save in 19 chances.
"Just got to tip your hat, they put the ball in play and found some holes," Melancon said. "They did a good job. Sometimes it happens that way."
The Pirates pulled ahead 2-1 in the seventh inning when McCutchen blasted a two-run home run to the seats in right-center off 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 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 two of the Pirates' three hits, a pair of singles.
Ross had a fine outing, as he gave up two runs and three hits in seven innings with seven strikeouts and no walks.
The Padres are third in the NL West, but they are 6-3 on their 10-game road trip. They took two of three from the NL East-leading Braves last weekend at Atlanta.
"No matter where we are in the standings, we're going to play hard until the end," Rivera said. "That's the goal for each guy on this team. We went to Atlanta and did our job and we came here and we've won three so far. We're going to keep going until Sept. 29 (the last day of the season), then we will come back to spring training next year with the same attitude."
NOTES: San Diego RF Kyle Blanks pinch-hit in the ninth inning and grounded out. He was not in the starting lineup after being removed from Tuesday's game in the sixth inning because of illness. ... Padres 1B Yonder Alonso admitted 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 ERA) will face San Diego RHP Ian Kennedy (6-9, 4.85) in the finale of the four-game series.