Some late-game heroics helped the Arizona Diamondbacks put an end to a losing streak.
The NL West leaders now try to string together consecutive victories for the first time in two weeks Wednesday when they face Miami Marlins rookie Jose Fernandez, who is starting to find his groove.
The Diamondbacks (38-33) won 3-2 Tuesday on Paul Goldschmidt's walkoff home run, ending a season-high tying four-game slide as well as the Marlins' three-game win streak. Goldschmidt's homer was his 17th of the season and the second game-ending home run of his career.
Goldschmidt had been 2 for 13 during the skid, though he homered in Monday's 3-2 defeat to Miami (22-48). Arizona, which hasn't won back-to-back games since June 4 and 5, also played error-free baseball Tuesday after committing one in each of the last four contests.
"Any time it's a walkoff, whether it's you or one of the other guys, it's fun," Goldschmidt said.
Martin Prado also drove in two with a fourth-inning homer for the Diamondbacks, who'll be getting their first look at Fernandez (4-3, 3.11 ERA).
The right-hander's ERA ranks third among rookie starters, and he's also second in strikeouts (77) and opponents' batting average (.210).
"He's so polished for a young pitcher," Marlins manager Mike Redmond said. "It's amazing how good his secondary pitches are."
The 20-year-old Cuban defector has been dominant through his last three starts, going 2-0 with a 1.35 ERA and 25 strikeouts over 20 innings. He limited St. Louis to three runs through seven innings while striking out 10 - the first pitcher younger than 21 with double-digit strikeouts since Felix Hernandez did it in 2007 - in Friday's 5-4 win.
Still, Fernandez doesn't seem to quite grasp how good he has been, finding himself star-struck at times.
"One of the special moments in the game: The first time I went up to hit, Yadier Molina was catching," he said. "I look up to that guy. When they won the World Series, I saw him catch and I said, 'Man, I wish one day I could shake his hand.'"
Fernandez matches up with Trevor Cahill (3-8, 3.96), who is winless in his last five starts.
Cahill matched a career high with 10 strikeouts while allowing two runs and five hits in 5 2-3 innings in Friday's 2-1 loss at San Diego after yielding 13 runs over 8 2-3 innings in his previous two outings.
The Diamondbacks have supplied Cahill with one or zero runs of support in four of his last five outings.
"Right from the get-go he was pretty darn good," said bench coach Alan Trammel, who acted as Arizona's manager while Kirk Gibson served a one-game suspension. "You can't fault anyone for one inning or a few hitters. It goes back to the offense that scored one run."
Cahill is 1-1 with a 4.50 ERA in three starts versus Miami. He matched a season best by throwing eight innings while holding the Marlins to one run and five hits in a 9-2 victory on May 17.
Arizona's Miguel Montero was 0 for 2 with a walk Tuesday after going 9 for 20 in his previous five games.