After scoring two quick runs, Arizona's bats went silent against the Miami Marlins on Saturday night.

The Diamondbacks failed to get another hit against Miami starter Anibal Sanchez and three relievers after two doubles and a single in the first inning. Miami rallied from the early deficit and won 3-2 on Hanley Ramirez's walkoff single in the ninth.

"We got a couple of runs early on (Sanchez) but he really settled down and threw the ball well," Diamondbacks manager Kirk Gibson said. "You've got to tip your hat to him on that."

The Diamondbacks struck quickly on Gerardo Parra's first-inning RBI double. Miguel Montero's run-scoring single drove in Parra for a 2-0 Arizona lead. Arizona loaded the bases with two out but Sanchez avoided additional trouble as he struck out Ryan Roberts to end the inning.

Sanchez settled down after the difficult first inning and retired the final 18 consecutive hitters he faced. Sanchez allowed three hits, walked four and struck out a career-best 14.

"He mixed it up and stayed around the plate," said Justin Upton, who went 0 for 3 with a walk and struck out three times. "He was pounding it, working fast and missing barrels."

Ramirez's line drive to left off reliever Brad Ziegler broke a 2-2 tie and scored Giancarlo Stanton after he reached on a one-out infield single and advanced to second on Emilio Bonifacio's grounder to first. Ziegler (0-1) intentionally walked Jose Reyes to face Ramirez.

An excited Ramirez jumped as he reached first base and slammed his helmet to the ground.

"It pumped me up," Ramirez said of being pitched to instead of Reyes. "I knew what they were trying to do but at the same time I told myself, 'shorten your swing down and stay through the middle.'"

Gibson defended the decision to walk Reyes.

"I felt that Reyes is a slap (hitter) who can run," Gibson said. "It gave us a forceout at any base as well. Ziegler didn't get the pitch where we wanted to. It didn't work out for us"

Steve Cishek (2-0) earned the win with a perfect ninth for Miami.

"This game was big for us and the way we won it," Miami manager Ozzie Guillen said. "It was big for the players. It brought their emotion back. Games like that can get you going."

Logan Morrison hit a leadoff homer in the eighth to tie it 2-2, driving Arizona reliever David Hernandez's pitch over the right-field fence for his second home run of the season.

The Marlins broke out of an 18-inning scoreless drought on Reyes' RBI single in the bottom of the seventh. Reyes drove in pinch-hitter Omar Infante, who reached on a leadoff triple to deep center.

Arizona starter Ian Kennedy left after surrendering Reyes' single. Kennedy pitched 6 1-3 innings, allowed one run and seven hits, walked two and struck out five.

"It was a battle trying to throw strikes," Kennedy said. "I don't know. I wasn't very efficient pitches-wise. I think halfway through I looked up and I had about 50-50 balls and strikes."

Sanchez settled down after the difficult first inning and retired the final 18 consecutive hitters he faced. Sanchez allowed three hits, walked four and his strikeout total was a career best.

"I made the adjustments right away," Sanchez said. "I threw the ball down and kept it in the zone. I tried to keep the score like that and wait for the hitters to wake up a little bit to tie the game or go ahead."

Upton's one-out walk in the eighth gave Arizona its first baserunner since Sanchez walked Willie Bloomquist with two out in the second.

Notes: Jason Kubel went 0 for 4, ending a 10-game hitting streak. ... LHP Patrick Corbin will be called up from Double-A Mobile and will start Arizona's series finale against Miami Monday afternoon. Corbin is 2-0 with a 1.67 in his two minor league starts. The Diamondbacks will announce the corresponding move on Sunday. ... The Marlins did not take infield practice before the game. Parts of the infield were still moist from overnight rain that skirted off the infield tarp. The roof which covers Marlins Park was left partially open to irrigate the outfield grass. ... Sanchez's previous career strikeout high was 11 against Pittsburgh on Sept, 10, 2011. ... Third base umpire Mike DiMuro left the game because of back pains after the top half of the first inning and was replaced by Mike Estabrook.