PITTSBURGH --- Starling Marte wasn't so sure he was about to become the hero when he and his Pittsburgh Pirates were down to their final strike on a night in which they had been dominated for eight innings.
However, the left fielder hit a two-run double with two outs in the ninth inning to tie the score, then scored the winning run on pinch hitter Ike Davis' broke-bat flare single into right field as the Pirates rallied for an improbable 3-2 victory over the Arizona Diamondbacks on Tuesday.
Marte's double hit the top of the center-field fence and came on an 0-2 slider from Addison Reed (1-4), who suffered his fourth blown save in 23 chances.
"I was struggling the first two pitches," Marte said. "But I was thinking about the pitch I want and he threw me a slider and it was a good chance to hit the ball."
Reed had been able to get Marte to chase a slider on the previous pitch and tried to do so again.
"It was a terrible pitch," Reed said. "I left it right over the middle of the plate. He's a good hitter. You can't do that to him. He put a good swing on it and you saw what happened."
Diamondbacks left-hander Wade Miley retired the first 14 batters he faced and carried a two-hit shutout into the ninth before being lifted after giving up back-to-back singles to second baseman Neil Walker and pinch-hitter Gregory Polanco to start the inning.
With Miley's pitch count at 111, Diamondbacks manager Kirk Gibson called on Reed (1-4).
Walker advanced to third on a fly out before Marte hit his double and continued to third base on a throwing error by rookie shortstop Nick Ahmed.
Center fielder Andrew McCutchen was intentionally walked, and Davis, batting for first baseman Gaby Sanchez, singled to give the Pirates their eighth win in the last 10 games.
"Every time we're up to bat there's a chance we do something," Davis said. "It's hard to shut us down for nine. We've done it a lot this year, come back. Anything is possible with us. We knew it was coming up. We started hitting the ball harder every inning and we put a couple runs on the board."
Reliever Ernesto Frieri (1-0), who pitched a scoreless top of the ninth despite giving up three hits, got his first win with the Pirates. He was acquired from the Los Angeles Angels last Friday in a trade.
Winless in nine straight starts, Miley went into the ninth looking for the first shutout and complete game of his four-year career. He gave up two runs and four hits with no walks and 10 strikeouts.
"I felt I commanded the zone, threw three pitches for strikes, located where I wanted to, but I just didn't make the pitch when I need to at the end," Miley said.
Left-hander Jeff Locke pitched effectively for the Pirates and was taken off the hook for what would have been a tough loss with the ninth-inning rally. He allowed two runs and eight hits in eight innings, walking one and striking out three.
Locke has a 2.23 ERA in five starts since being recalled from Triple-A Indianapolis on June 8.
First baseman Paul Goldschmidt and left fielder David Peralta had two hits each for the Diamondbacks, who scored both their runs in the fifth on back-to-back, two-out RBI singles by catcher Miguel Montero and second baseman Aaron Hill.
NOTES: Arizona LF Mark Trumbo began his rehab assignment in the rookie-level Arizona League on Tuesday night and singled and doubled in his first two plate appearances. He had been out since April 22 with a stress fracture in his left foot. ... Diamondbacks SS Chris Owings underwent an MRI exam that showed no structural damage in his left shoulder. Owings, on the disabled list since June 26, is cleared to begin throwing but won't be allowed to hit for another week. ... Pirates C Russell Martin returned to the lineup after missing the previous two games with a sore left shoulder and went 1-for-3. ... Pittsburgh RF Gregory Polanco did not start for the first time since being called up June 10 from Triple-A Indianapolis but had a pinch-hit single in the ninth. ... Pirates LHP Francisco Liriano will pitch a four-inning simulated game Wednesday, the first time he will face hitters since going on the disabled list June 11 with a strained left oblique. ... Diamondbacks RHP Chase Anderson (5-3, 3.63 ERA) will face RHP Charlie Morton (4-9, 3.41) on Wednesday night.