PHOENIX (AP) When the roof is open at Chase Field, the ball tends to fly out.
That's what happened Friday night.
Sean Rodriguez, Gregory Polanco and Jordy Mercer homered and the Pittsburgh Pirates held on to beat Arizona 8-7, snapping the Diamondbacks' five-game winning streak.
Pirates manager Clint Hurdle knows all about the ballpark and what happens in the dry desert air because he made regular trips there in eight seasons as manager of the Colorado Rockies.
''You open that roof, hot like this, I've seen a bunch of ball games here for a lot of years,'' Hurdle said. ''Some crazy things can happen.''
All three home runs came off Patrick Corbin (1-2), who allowed five runs in six innings.
''A couple of mistakes early,'' Corbin said, ''and in this ballpark if you make mistakes early they are going to go a long way. `'
Arizona's Welington Castillo homered twice and has four in his last four games. David Peralta hit a home run for the Diamondbacks in the opener of their 10-game homestand.
''It was a tough night to pitch,'' Arizona manager Chip Hale said. ''Obviously the ball was really carrying with the roof open. There were some balls that were hit pretty hard. `'
Jonathon Niese (3-0) got the win despite surrendering four runs and 10 hits in 5 1/3 innings.
Mark Melancon allowed three straight singles with two outs in the eighth but pitched a perfect ninth for his fourth save.
The Diamondbacks rallied with three runs in the eighth, the last on Jean Segura's face-first slide into first base for an RBI infield single to cut Pittsburgh's lead to 8-7. Arizona threatened more when Paul Goldschmidt beat out a grounder to the shortstop Mercer, a call reversed on review after he initially was ruled safe, to load the bases, but Yasmany Tomas bounced out to third to end the inning.
The Diamondbacks, back from a 7-3 road trip, fell to 2-6 at home.
Mercer said he could feel the difference when the roof opened just before the game began.
''You could feel the wind whipping in there,'' he said. ''You could feel it out there definitely on the field that the ball was flying.''
Rodriguez and Polanco hit consecutive home runs in the second inning
Rodriguez's two-run shot landed in the picnic area far above the concourse in left. Two pitches later, Polanco's home run bounced high off the batter's eye in center, far above the 407-foot line.
Mercer's homer, leading off the fourth, went farthest of all. Major League Baseball's statcast measured it at 466 feet, longest in the majors this season.
''Oh man, I thought Cheech's (Rodriguez) and Polanco's were way better than mine,'' Mercer said. ''They were higher. Mine was kind of on a line.''
Hale said the plan is for struggling RHP Shelby Miller to make his next scheduled start, but that could change.
Miller walked four straight batters to start the third inning and was yanked in Sunday's win at San Francisco. The right-hander, acquired in an offseason trade with Atlanta, is 0-1 with an 8.59 ERA in four starts.
His next scheduled start is Tuesday against the St. Louis Cardinals, the team that drafted him in the first round in 2009. He was 15-9 for St. Louis in 2013, a year the Cardinals won the World Series.
Pirates: LHP Cory Luebke (right hamstring tightness) began his rehab assignment by pitching two scoreless innings for Triple-A Indianapolis on Thursday. ... RHP Jared Hughes (left lat muscle strain) made his first rehab appearance Wednesday, also pitching two scoreless innings for Indianapolis.
Diamondbacks: RHP Josh Collmenter (shoulder) begins extended spring training this week and is expected to pitch three innings in early May, probably with a minor league team.
Pirates: RHP Juan Nicasio (2-1, 4.80 ERA) makes his fourth start of the season, meeting Arizona on Saturday night in Pittsburgh's fifth game of a 10-game road trip.
Diamondbacks: RHP Rubby De La Rosa (1-3, 8.44) is back for his third start after two relief appearances.