CHICAGO -- When Martin Prado's ninth-inning grounder up the middle hit the second base bag and kicked into shallow right to score a pair of runs, the D-backs players had the same reaction.
"Holy cow, we got a break. Wow," starting pitcher Wade Miley said of what went through his mind. "Everybody was like, in shock."
The break helped the D-backs rally for five runs in the ninth to beat the Cubs, 7-5, on Wednesday afternoon at Wrigley Field.
"That was a weird inning," Cubs manager Rick Renteria said. "I've never seen a ball hit the corner of the bag on the ground ball. That's a first for me."
The beleaguered D-backs have struggled through a miserable start to their season. They entered Wednesday with a Major League-worst 5-18 record and a four-game losing streak. When the ninth inning rolled around, they were trailing, 5-2, and faced the prospect of their 11th loss in 12 games.
Cubs reliever Pedro Strop, though, could not find the strike zone, walking a pair of hitters, and shortstop Starlin Castro committed an error between walks to load the bases with one out.
It looked like the Cubs might get out of the jam when Gerardo Parra struck out after a 10-pitch at-bat that saw him foul off five two-strike pitches.
"GP, unbelievable at-bat," Miley said.
But in a season that's been filled with the breaks going against them, fortune finally smiled on the D-backs.
Prado's grounder up the middle eluded Strop's glove, and before one of the middle infielders could nab it, it hit second base and kicked into right field, allowing two runs to score and it cut the Chicago lead to 5-4.
"I think [second baseman Darwin] Barney would have got it," D-backs manager Kirk Gibson said. "We probably would have got one run out of it. Instead, it lets the guys advance another base and [Miguel Montero] gets the big hit."
"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."
After Strop struck out Paul Goldschmidt, Renteria brought the left-handed James Russell on to face lefty Montero.
Montero took a huge cut at a first-pitch fastball from Russell and missed badly. But the catcher recovered and on the seventh pitch of the at-bat, he lined a single to right to score pinch-runner A.J. Pollock and tie the game.
"I was looking for a fastball and he gave me a fastball, and I took a little bit of a big swing -- probably a little too big," Montero said. "After that, I just tried to shorten up my swing a little bit and hit it the other way actually.
"Finally, we got something to go our way. We finally got something that gave us a little bit of a sign and hope and we took advantage. It was a great comeback and we battled. The ninth inning, we battled every at-bat, everybody put good at-bats together and we capitalized."
Aaron Hill followed Montero's hit with a blooper down the right-field line that barely stayed fair and landed out of the reach of Justin Ruggiano. The hit, Hill's fourth of the day, scored a pair of runs to put the D-backs up, 7-5.
"Give them credit for battling back," Gibson said. "Miggy had a huge at-bat when they brought the lefty in against him. The win feels very good."
When you've struggled like the D-backs have this year, you look for and hang on tightly to any manner of hope. Now that they got a couple of breaks in the ninth and cashed them in, they want to keep it going.
"For us to get them, it's great," Miley said. "Anything can happen now."
With the historic ballpark celebrating the 100th anniversary of the first game ever played there, the two teams wore throwback uniforms, with the Cubs wearing Chicago Federals jerseys and the D-backs wearing Kansas City Packers attire.
The D-backs may not want to go back to their old threads after this one.
Miley did not pitch particularly well, as his lack of command caused his pitch count to rise quickly, and he was removed from the game with two runs in and no outs in the sixth with the Cubs up, 5-2.
"I'm at 90 pitches in the fifth inning again," Miley said. "That really can't happen, and as a group, we've got to get past that. But the offense did an unbelievable job. Miggy told me when I was coming out, he said, 'We're going to take care of this, we're going to pick you up,' and they did. It's a good feeling."
Those kinds of feelings have been few and far between for the D-backs this year.
"I'm just hoping from this point on, good things start happening for us," Prado said. "I know it's disappointing the way that we started the season, but we might turn it around from now on."
Steve Gilbert is a reporter for MLB.com. Read his blog, Inside the D-backs, and follow him on Twitter @SteveGilbertMLB. This story was not subject to the approval of Major League Baseball or its clubs.