The Diamondbacks finally caught some breaks and took advantage of them on Wednesday afternoon, scoring five times in the ninth inning to rally from a three-run deficit to beat the Chicago Cubs 7-5 at Wrigley Field.

Starting pitcher Wade Miley was watching the ninth inning on television from the visitors' clubhouse when Martin Prado's ground ball up the middle hit the second-base bag and bounced away from Cubs infielders.

Prado's good-luck single came with the bases loaded and one out and the Diamondbacks trailing 5-2. Two runs scored on the play, setting the stage for Miguel Montero's game-tying single against Cubs reliever James Russell.

Aaron Hill followed with his fourth hit of the game, a two-run triple that dropped in front of a sliding Justin Ruggiano in right field and put the Diamondbacks ahead for good.

Wild ninth: Leading 5-2, Cubs reliever Pedro Strop started the ninth with a four-pitch walk to Chris Owings.

The next batter, Tony Campana, bounced a ground ball up the middle, but Cubs shortstop Starlin Castro booted it, putting men on first and second. "Try to be too quick on that play," Castro said. "That's what happened."

Another walk loaded the bases, and after Gerardo Parra struck out swinging in a 10-pitch at-bat, Prado came to the plate with one out. His ground ball up the middle was sharply hit, but it looked like the Cubs were going to get at least one out on it. That's when it caught the bag and caromed into center field.

"Baseball is a tricky game," Prado said. "That's the beauty about not losing the faith that something good might happen at any time in the game."

Montero's at-bat: Even after the Prado ball, the Diamondbacks were still trailing 5-4 and in need of a hit.

After Strop struck out Paul Goldschmidt, the Cubs called upon the lefty Russell to face Montero, who came up empty on a violent hack on the first pitch. He said the swing was "probably a little too big."

"After that," Montero said, "I just tried to shorten up my swing a little bit and hit it the other way actually."

Instead, he wound up pulling a base hit into right field. Montero excitedly clapped his hands as he ran to first base.

With Justin Grimm replacing Russell, Hill hit a perfectly placed pop fly down the right field line. Ruggiano couldn't make the play — he hurt his hamstring in the process — and Hill wound up at third with a two-run triple.

"Finally we got something to go our way," Montero said. "We finally got something that gave us a little bit of a sign and hope and we took advantage."

View from the press box: It sort of figured the Diamondbacks were going to win on Wednesday. How could the Cubs, who have been snake-bit for more than a century, possibly win on the day of their ballpark's 100th anniversary? Give the Diamondbacks credit for taking advantage, but this was more a Cubs loss than a Diamondbacks victory.

Notable: In one start and one relief appearance to start his career, Bolsinger has given up nine runs (eight earned) in seven innings. Opponents have 13 hits and three walks off him. … Jackson, who pitched for the Diamondbacks during part of the 2010 season, has not fared well since signing with the Cubs before last season. He posted a 4.98 ERA in 31 starts last year and is posting even worse results through four starts this season.