"You've just got to win," manager Mike Redmond said. "It doesn't matter how we do it or how we get it done. Everybody understands where we're at. All these games are big. We've just got to find a way to get a 'W.'"
Mike Dunn worked two innings of scoreless relief, and the lefty won his 10th game -- the most ever by a Miami reliever in one season.
The Marlins improved to 60-61 -- one-game behind the Braves for second place in the National League East. Still with playoff aspirations, Miami is also showing vast improvement. The 2013 Marlins didn't win No. 60 until Sept. 27. On Aug. 14, they were 46-73.
"When you come from behind and win a game, it lifts your team up," said Brad Penny, who started and gave up four runs in five-plus innings. "It's a game you could have lost. That was huge, to get a walk-off for [Ozuna]."
The Marlins rallied to tie it in the eighth inning on Adeiny Hechavarria's RBI single. In the 10th, Garrett Jones walked to open the inning off Bradin Hagens, who was making his MLB debut. Jeff Mathis singled to right. With the count full, Ozuna ripped a liner to left-center to give Miami its 10th walk-off win of the season.
"It was 3-0, then he threw me one strike," Ozuna said. "Then I heard some of my teammates say, 'Take another one!' Then it was 3-2. The catcher went to talk to him. I told them, 'Give me the [pine tar] stick.' I put the stick on the bat, and I focused on putting the ball in play, to the middle. I got a line drive. I feel great. I got out of my slump."
In the ninth inning, the Marlins threatened off Hagens, but they were turned away. Christian Yelich opened the inning with an infield single, and he advanced to second on Donovan Solano's sacrifice bunt. Giancarlo Stanton was intentionally walked, but Casey McGehee bounced into a 4-6-3 double play.
After missing on numerous chances throughout the night, the Marlins used a two-out rally in the eighth inning to tie it off Brad Ziegler. Jarrod Saltalamacchia and Ozuna each walked. Jordany Valdespin pinch-ran for Saltalamacchia, and he scored on Hechavarria's single to center.
An inning earlier, the Marlins were frustratingly close to collecting a couple of extra-base hits off Evan Marshall, who ended up striking out the side in order. But it wasn't totally smooth sailing. With one out, Solano ripped a ball down the left-field line for what would have been a double. But the ball tailed foul by a few feet. Solano was caught looking for strike three to end a 10-pitch at-bat.
Stanton stepped up and was within a couple of feet from tying the game when his opposite-field line drive cleared the wall in right. It had the distance, but not the accuracy. The ball drifted just foul, prompting Stanton to jump up and down in frustration.
Miami's rally in the eighth inning got Penny off the hook for what could have been a loss in his second start since joining the team on Saturday. The 36-year-old was hurt by three walks, as each one scored.
"You can't defend a walk," Penny said. "I don't mind if I give up hits and get beat. It's tough to give up runs when you just let them on."
The Marlins had chances off Chase Anderson, who yielded nine hits and walked two in six innings, but they didn't do serious damage against the D-backs starter.
Miami chipped back with a pair of runs in the third inning. Penny delivered his first double since Sept. 19, 2007, and he scored on Solano's two-out double. Stanton's single trimmed the deficit to 3-2.
Keeping Stanton in the park, Anderson said, was a relief.
"If I give up singles to him, it's still kind of a win," Anderson said.
But in the 10th, it was Ozuna who brought the park to life.
"For a long time I didn't get a base hit," the 23-year-old said. "I had a ground ball or a strikeout. That's exciting to get a line drive in that situation. I feel great."