Andy Marte rolled a ground ball to shortstop in what appeared to be an easy inning-ending double play. Ahmed sprinted down the line and slid late. As he slid into second base, Pirates second baseman Jayson Nix's throw deflected off his arm and rolled behind the pitcher's mound, giving the D-backs a series-tying 3-2 win.
"I honestly thought it was just a routine double play, so I crossed home and I was waiting to see the ball going across the diamond to first," Gosewisch said. "Then I looked, and the ball's on the ground, and they're complaining and I don't know what's going on. I just want to celebrate."
The strange play led to a muted celebration on the field. Pirates players surrounded second-base umpire Lance Barrett, and manager Clint Hurdle came out to argue. D-backs manager Kirk Gibson stayed on his side of the field.
"In [the umpire's] opinion, he did not alter his slide," Hurdle said. "They said he threw his hands up the way most guys do when they go into slide, and unfortunately, it was in direct line with the ball.
"I felt there was an extra effort in getting his hands up in the way."
Said Gibson: "I had nothing to appeal. I was good with that call."
Crew chief Ron Kulpa said Ahmed did not interfere with the play by the definition of the rule.
"It has to have been willful and deliberate with obvious intent to break up a double play," Kulpa told reporters. "The guy has to do something obviously, willfully, intentionally to break up that double play. Guys slide into second base all the time with their hands up."
Ahmed, who spoke to reporters with ice on his forearm, said he never would have expected to break up a double play by deflecting the ball.
"Obviously, I had no intention," Ahmed said. "I don't think anyone has ever done that -- to throw their hands up and block the ball like that.
"I just slid hard and late, and the ball happened to hit me, and I'm glad it did."
The odd walk-off overshadowed something that hasn't been seen in a long time, either -- a seven-inning start from Trevor Cahill.
Cahill hadn't gone seven full innings since Aug. 22, 2013, and in his fourth start since being recalled from the Minor Leagues, he had his best outing of the season. Cahill confounded the Pirates for much of the game, striking out seven while giving up only one run.
"It's kind of a progression," Cahill said. "In my last couple, the results weren't necessarily there, but I was happy I was around the plate. I knew if I stay around the plate, things will eventually turn around."
Cahill ran into trouble late, giving up a double to Michael Martinez with two outs in the seventh, and Gibson visited him on the mound. Cahill told him he wanted to go for the final out against Pedro Alvarez, and Gibson walked back to the dugout.
"It's been a while since he [felt like that]," Gibson said.
Cahill rewarded Gibson's faith in him with a strikeout of Alvarez to end the threat. Although he didn't get the win because reliever Brad Ziegler gave up a run in the eighth, Sunday's game was a step in the right direction for the former All-Star.
"He feels really good about his game today," Gibson said. "He should."
Adam Lichtenstein is an associate reporter for MLB.com.