PITTSBURGH (AP) -- Joey Votto homered off Kyle Farnsworth in the 10th inning and the Cincinnati Reds edged Pittsburgh 6-5 Friday night to pull even with the Pirates for the top wild-card spot in the National League.
Cincinnati pushed across three unearned runs in the ninth off Pittsburgh closer Mark Melancon to tie it and Votto won it an inning later when his fly to left field reached the first row of seats for his 24th homer of the season.
JJ Hoover (5-5) earned the win for the Reds, who have won four straight. Aroldis Chapman worked the 10th for his 38th save.
Farnsworth (1-1) retired Brandon Phillips to start the 10th but left fielder Starling Marte couldn't quite grab Votto's shot down the line and the Reds started a pivotal three-game series with a stunning victory.
The Pirates appeared firmly in control through eight innings. Francisco Liriano overwhelmed the Reds, allowing two runs on three hits, walking three and striking out seven. The left-hander needed only 94 pitches to record 24 outs, but was pulled in the ninth for Melancon, who has been outstanding most of the season but was coming off a blown save in a 3-2 loss to San Diego on Wednesday.
Things didn't get any better 48 hours later.
Melancon sandwiched outs around a single by Ryan Ludwick before things started to unravel. Todd Frazier reached when shortstop Jordy Mercer threw a routine grounder into the stands, scoring Ludwick. Zach Cozart followed with an RBI single. Cincinnati rookie base-stealing specialist Billy Hamilton pinch ran for Cozart and promptly swiped second then raced home when Devin Mesoraco's sharp grounder ping ponged onto the grass in shallow left field.
Votto took care of the rest as Cincinnati climbed out of third place in the heated NL Central race for the first time in three months.
Ludwick finished 3 for 5 for the Reds, while Frazier hit his 17th home run.
Jose Tabata and Neil Walker hit consecutive homers off Cincinnati starter Mat Latos in the first and Pittsburgh appeared on its way giving itself some breathing room as the franchise pursues its first playoff spot since 1992.
The Pirates did their best to downplay the importance of the franchise's biggest series in 21 years while Reds manager Dusty Baker joked if his players didn't understand the stakes it was time for them "to get new jobs."
PNC Park, typically a ghost town this time of year as the Pirates play out the string, was electric when Pittsburgh took the field. Ludwick's RBI single off Liriano in the top of the first took some of buzz out of a crowd that included Pennsylvania governor Tom Corbett and Pittsburgh Penguins coach Dan Bylsma, but only for a moment.
Tabata led off the bottom of the first with his sixth home run of the season on a shot well into the bleachers in left field and Walker took Latos' very next pitch over the wall in center to give Pittsburgh a 2-1 lead. The blast marked the fourth time in club history the Pirates started a game with consecutive home runs.
Andrew McCutchen walked and Justin Morneau singled, earning Latos a rare first-inning visit from Baker. He worked out of the jam but the reprieve only lasted until the fourth. Marlon Byrd walked with one out, moved to third on a hit-and-run single by Alvarez and scored when Martin recorded his first non-home run RBI since Aug. 22. Mercer beat out an infield hit to plate Alvarez and the Pirates had a commanding 4-1 lead.
Latos left after six innings, giving up four runs on eight hits with two walks and a season-low one strikeout.
While Latos labored, Liriano cruised. Save for Frazier's solo homer leading off the fifth he had little trouble working through Cincinnati's powerful lineup. He picked up his 1,000th career strikeout when Chris Heisey whiffed in the eighth and received a standing ovation when the milestone was flashed on the scoreboard.
The scoreboard flashed a different number an hour later as the Reds finished off a comeback that could resonate through the final week of the regular season.
NOTES: Pirates manager Clint Hurdle was ejected in the eighth for arguing after McCutchen was hit by reliever Sam LeCure, who was given a warning by home plate umpire Mark Carlson ... The series continues on Saturday when Pittsburgh's A.J. Burnett (8-11, 3.43 ERA) faces Home Bailey (11-10, 3.40). Bailey tossed his first career no-hitter in his previous start at PNC Park last September.
Follow Will Graves at HTTP://WWW.TWITTER.COM/WILLGRAVESAP