PHOENIX (AP) Arizona pitcher Shelby Miller played left field and chased after Sean Rodriguez's go-ahead double in the 13th inning before striking out to end the game, and the Pittsburgh Pirates beat the Diamondbacks 12-10 on 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 Diamondback pitcher to play a position and the first major leaguer to do so since Jason Gurka played right field for the Colorado Rockies on Sept. 15.

The Pirates had a season-high 20 hits 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.

More from FoxSports

Pittsburgh scored twice in the 12th to go up 10-8, but Neftali Feliz (1-0) couldn't hold that lead.

Rodriguez lined his double off the wall in left off Evan Marshall (0-1), and Jonathon Niese made it 12-10 win a run-scoring single.