PITTSBURGH -- Once the game went to extra innings, the D-backs knew they had the Pirates right where they wanted them.
"We get to those extra-inning games and I feel like we're the most prepared team for extra-inning games than any team in the league," D-backs outfielder A.J. Pollock said. "We just know that we've got to grind it out and someone's going to come through."
Sunday that person was outfielder Adam Eaton, whose bloop double to center scored a pair of runs as the D-backs beat the Pirates, 4-2, in 16 innings in front of a sellout crowd at PNC Park.
With the win, the D-backs took two of three games in the series and gained a game in the National League West standings. Arizona now trails the Dodgers by 7 1/2 games.
After the D-backs tied the game in the sixth inning, the two teams were scoreless until the 16th.
Pollock drew a walk to lead off the 16th against reliever Kris Johnson, who was making his Major League debut after eight years in the Minors and was in his sixth inning of work.
"He had good stuff, very composed," Eaton said of Johnson. "To be thrown in that situation in extra innings and to throw the way he did was very impressive."
Didi Gregorius followed with a single to right and both runners moved up on a groundout by Wil Nieves. Eaton then hit a blooper to left-center that fell just underneath the glove of a diving Andrew McCutchen to plate Pollock and Gregorius.
"Just trying to see something up and try to drive it to the left side," Eaton said. "He threw a [fastball] and I tried to stay through it as best I could, and good things happen when you put the ball in play, so I was very fortunate."
The D-backs are 13-5 in extra-inning games this year. More amazingly, Sunday's game was the ninth time they have played extra innings on a getaway day -- the final game of a series when they are traveling to another city afterwards.
"I can't tell you how many times we've had extra-inning games on getaway days, but we know someone is going to step up," Pollock said. "We have a bunch of guys that don't quit."
That mindset, the players feel, is what gives them an advantage.
"When we get in those situations we think, as a group, we kind of know, 'Hey, we're just getting warmed up, as long as you guys want to go, we're going to fight with you,'" Eaton said. "It was nice to be able to get in a position to help the team win and I'm glad it worked out the way it did."
The Pirates scored runs in the first and third innings to take an early 2-0 lead.
They would not score again the rest of the way, going 0-for-8 with runners in scoring position for the game.
"We were pitched challengingly, had balls to hit and weren't able to hit them," Pirates manager Clint Hurdle said. "Sometimes got out of ourselves with some big swings, need to put your foot down and make contact. There are some at-bats we need to show improvement in lengthening the quality of our at-bats."
First it was Wade Miley, who settled in and threw up zeros after the third before departing after eight innings. Then six Arizona relievers combined to throw eight scoreless innings while striking out 10.
J.J. Putz, who lost his closer's job after suffering an elbow injury earlier this year, pitched the 16th to earn the save after current closer Brad Ziegler worked the 14th and 15th innings.
"The last two times that J.J.'s thrown are the best he's thrown since he hurt his elbow," D-backs manager Kirk Gibson said. "Knowing he had all those saves under his belt, we felt pretty good about him shutting them down that last inning."
D-backs hitters had trouble solving Pittsburgh starter Charlie Morton in the early going before finally breaking through for a pair of runs in the sixth.
"You can get frustrated," Gibson said. "You have these opportunities and you don't come through. You have no choice but to battle."
Steve Gilbert is a reporter for MLB.com. Read his blog, Inside the D-backs, and follow him on Twitter @SteveGilbertMLB. This story was not subject to the approval of Major League Baseball or its clubs.