PHOENIX — Diamondbacks pitcher Shelby Miller played leftfield and chased after former Ray Sean Rodriguez's go-ahead double in the 13th inning before striking out to end the game, and the Pirates beat Arizona 12-10 Sunday.
Miller had to play the outfield after shortstop Nick Ahmed was ejected in the 12th for arguing balls and strikes. Miller is the first Diamondbacks pitcher to play a position and the first major-leaguer to do so since Jason Gurka played rightfield for the Rockies on Sept. 15, STATS said.
The Pirates had a season-high 20 hits in the game, which lasted 5 hours and 25 minutes, and built a five-run lead after three innings, but Arizona scored twice in the eighth and Paul Goldschmidt tied it in the ninth with a two-run homer, his second of the game.
Pittsburgh scored twice in the 12th to go up 10-8, but Neftali Feliz couldn't hold that lead.
Rodriguez lined his double off the wall in left off Evan Marshall, and pitcher Jonathon Niese made it 12-10 with an RBI single — also to Miller in left.
Arquimedes Caminero closed it out, working around a single in the 13th for his first save.
Miller entered as a pinch-runner for pitcher Zack Greinke in the 12th after Greinke got an infield single as a pinch-hitter.
Arizona's Welington Castillo hit a three-run homer on his 29th birthday, giving him six homers and 11 RBIs in the past seven games. Yasmany Tomas also homered for the Diamondbacks, who had 15 hits.
Gregory Polanco and Jason Rogers drove in two runs each for the Pirates.
Goldschmidt hit a solo homer off Francisco Liriano in the first, though it took a second to figure out if Polanco had caught it. The fans in rightfield saw the ball creep just over the wall, and the rest of the crowd joined them in cheering once they finally realized the ball had gone out.
There was some doubt about Castillo's homer in the third, too. His liner on Liriano's 1-and-2 pitch looked as if it might hook too much to stay fair, but it caught the foul pole in left for a three-run homer that put Arizona up 4-3.
Liriano settled in after that, allowing four runs on five hits with six strikeouts.
Arizona starter Robbie Ray labored for the first time this season, giving up five runs on eight hits. He had allowed two earned runs or fewer in six straight games dating to last season.
Rogers hit a two-run triple off him in the third and Polanco drove in two with a single in Pittsburgh's five-run third to build an 8-3 lead.