CHICAGO (AP) -- On the 100th anniversary of the first game at Wrigley Field, the team with the worst record in the major leagues won.
And it wasn't the Chicago Cubs.
After an error by shortstop Starlin Castro, the Arizona Diamondbacks rallied for five runs in the ninth inning and 7-5 victory Wednesday.
Martin Prado hit a two-run single off Pedro Strop (0-2), Miguel Montero had a tying single against James Russell and Aaron Hill followed with a two-run triple off Justin Grimm.
"These guys come in here with a good attitude. I've been saying it every day," Arizona manager Kirk Gibson said. "Just the couple of breaks we got -- especially when the ball hit the bag. That was a great break."
But there also was bad news for the Diamondbacks. An MRI revealed outfielder Mark Trumbo has a stress fracture in his left foot and will be sidelined an undetermined length of time.
Trumbo will travel to Arizona for a second opinion from Dr. Michael Lee before a timetable is set for his return. Although he was hitting only .210, though he is tied for the NL lead with seven homers and was second with 19 RBIs.
The MRI also showed plantar fasciitis in his left foot, which Trumbo has been dealing with since spring training.
"The plantar (fasciitis) at times has been pretty bad but manageable," Trumbo said. "That's what you have to do. You've got to earn a living and play. This was to the point where I severely had to compensate running-wise to the point where I probably wouldn't be much of an asset on either side."
Wrigley Field, the second-oldest in the major leagues behind 102-year-old Fenway Park in Boston, opened on April 23, 1914, when the Federal League's Chicago Federals beat the Kansas City Packers 9-1.
Fans sang "Happy Birthday" in the middle of the fifth inning, the Cubs wore Federals' uniforms and the Diamondbacks wore Kansas City Packers' threads.
Before a crowd of 32,323 -- about 9,000 under capacity -- the Cubs led 5-2 in the ninth. Strop walked Chris Owings on four pitches and Castro allowed Tony Campana's grounder to kick off his glove for an error. Castro tried to keep his left leg on second as he retrieved the ball, and second base umpire Brian O'Nora called the sliding Owings safe -- a decision confirmed by the replay umpire in New York.
Pinch-hitter Eric Chavez walked on a full count, loading the bases, and Gerardo Parra struck out. Prado's bouncer up the middle bounded off second base, eluding second baseman Darwin Barney and kicking into short right-center field as the Diamondbacks closed to 5-4.
"Barney probably would've got it, and we would've gotten one run out of it," Gibson said. "Instead it lets the guys advance another base. It was a big hit."
Strop struck out Paul Goldschmidt for the second out. Montero fouled off a 2-2 pitch, took a ball, and then lined a tying single to right. Hill blooped a ball down the right-field line and Justin Ruggiano injured his left hamstring as he tried for a sliding catch near the foul line and the bullpen mound. He needed assistance to leave the field and was replaced by Ryan Kalish.
"That was a weird inning," Cubs manager Rick Renteria said. "I've never seen a ball hit the corner of a bag on a ground ball. I know that the way the inning initially started opening up wasn't too good either, but that's a first one for me."
Trevor Cahill (1-3) pitched two scoreless innings, for Arizona (6-18), which ended a four-game losing streak, and Addison Reed got his fourth save as the Cubs went quietly in a 1-2-3 ninth.
"One of the good things about this team is just everybody keeps being positive," Prado said.
Arizona's Wade Miley gave up five runs -- three earned -- and four hits in five innings. He walked three batters and struck out seven.
"I'm not sure what we've needed but that always helps," Miley said of the ninth. "The walks got me in trouble. I had 90 pitches in the fifth inning, again. That really can't happen. I've got to get past that. As a group we have to get past that. The offense did an unbelievable job."
NOTES: Cubs starter Jeff Samardzija allowed two runs and seven hits in 7 1-3 innings and is winless in 11 starts since beating San Diego on Aug. 24. ... Arizona OF A.J. Pollock (neck stiffness) didn't start but pinch-ran in the ninth.