PITTSBURGH -- Devin Mesoraco knows the pain of Pirates' fans very well. He was one, too, while growing up 80 miles northeast of Pittsburgh in Punxsutawney, Pa.
However, Mesoraco only added to their misery Friday night as his two-run single off the glove of diving third baseman Pedro Alvarez with two outs and two strikes tied the game in a three-run ninth inning and Joey Votto won it with a home run in the 10th as the Cincinnati Reds rallied for a 6-5 victory in the opener of a pivotal three-game series between National League Central contenders at PNC Park.
Votto connected off Kyle Farsnworth (1-1), who was released by the Tampa Bay Rays last month, for his 24th home run of the season, tucking it just inside the foul pole, with one out to break a 5-5 tie.
The Reds moved into a tie with the Pirates, who haven't been to the postseason since 1992, for the first NL wild card as both teams are 88-66.
The St. Louis Cardinals, who played later at Milwaukee, led the NL Central entering the day by one game over the Pirates and two over the Reds.
The Reds and Pirates hold a five-game lead in the wild-card standings over the Washington Nationals, who beat the Miami Marlins 8-0.
Playing in their most important late-season game since '92, the Pirates took a 5-2 lead into the ninth but Mark Melancon -- in large part because of a throwing error by shortstop Jordy Mercer -- was unable to hold it as he blew his second save opportunity in three days.
Ryan Ludwick singled with one out in the ninth and moved to second on Jay Bruce's ground out. Todd Frazier then hit a grounder to Mercer, who threw high and wide to first base, allowing Ludwick to score and make it a two-run game.
Zack Cozart flared a single to right, moving Frazier to third. Billy Hamilton pinch ran and stole second for his 10th steal in as many attempts since making his major league debut Sept. 3.
Mesoraco then fouled off four two-strike pitches before hitting his single that scored Cozart and Hamilton to tie it at 5-5 and pin Melancon with his fourth blown save in 20 opportunities.
Ludwick had three hits for the Reds, Mesoraco had two hits and Frazier hit his 17th home run.
J.J. Hoover (5-5) pitched a scoreless ninth for the win and Aroldis Chapman retired the side in order for his 38th save in 43 chances.
Jose Tabata and Neil Walker hit consecutive home runs to lead off the bottom of the first inning to put the Pirates ahead 2-1.
The back-to-back shots represented just the fourth time in Pirates' history that they opened the game with consecutive home runs. The last time was April 17, 2011, also against the Reds, when Andrew McCutchen and Tabata connected off Edinson Volquez.
It was the first time in his career Tabata homered to lead off the first inning.
Francisco Liriano pitched eight strong innings for the Pirates but wound up with a no-decision. The left-hander gave up just two runs and three hits while striking out seven and walking three.
Liriano also recorded 1,000th career strikeout when he fanned pinch-hitter Chris Heisey to lead off the eighth inning. That gave the Pirates a club-record 1,194 strikeouts for the season, surpassing the mark set last year.
Reds starter Mat Latos settled after the shaky start but allowed four runs and eight hits in six innings with two walks and one strikeout.
Tabata finished with two hits and two RBIs as he also singled in a run in the seventh inning to push the Pirates' lead to 5-2. Alvarez and Mercer also had two hits for Pittsburgh.
Pirates manager Clint Hurdle was ejected in the bottom of the ninth inning by home plate umpire Mark Carlson. Hurdle argued that Reds reliever should have been ejected for hitting McCutchen with a pitch to lead off the inning.
While Hurdle argued, LeCure walked over to first base and appeared to apologize to McCutchen.
It marked the 23rd hit by pitch in the 14 games between the two teams this season.
The season series is tied at 7-7.
NOTES: Pittsburgh LF Starling Marte was not in the starting lineup for a second straight game as his wife was in labor for more than 18 hours before delivering the couple's first child, a son named Smerling, early Friday morning. ... Cincinnati rookie OF Billy Hamilton was back on the bench after going 3-for-4 with four stolen bases in his first major league start on Wednesday in a win at Houston. ... Pirates RHP A.J. Burnett (8-10, 3.45 ERA) faces Reds RHP Homer Bailey (11-10, 3.40) on Saturday night.