AP

MIAMI (AP) — Harold Ramirez came up with a clutch moment to help the Miami Marlins cap a ninth-inning comeback victory.

The 24-year-old rookie hit a game-winning sacrifice fly off reliever Yoshihisa Hirano to finish a two-run rally and lift the Marlins over the Arizona Diamondbacks 3-2 on Friday night. The drive to center was deep enough to score Neil Walker.

On a night the Marlins were wearing retro uniforms worn by the 1997 World Series champion team, Ramirez wanted to emulate Edgar Renteria. Ramirez, of Colombia, recalled how his compatriot's walk-off base hit drove in the game-winning run that gave the Marlins the World Series title.

"You're not going to believe it but before the game I thought about that," said Ramirez, who was 3 when Renteria had the memorable hit. "I got the opportunity and I made it."

The Marlins' comeback kept Arizona starter Zack Greinke from earning another victory against Miami. Greinke allowed a first-inning run before retiring 11 consecutive batters. The right-hander went six innings and scattered four hits, struck out five and walked one. He is 7-0 in his career against the Marlins.

"It's not good," Greinke said. "Just got to win the next couple games."

Jorge Alfaro's sacrifice fly to deep right off closer Greg Holland (1-2) earlier in the ninth scored pinch runner Yadiel Rivera and tied the game. Garrett Cooper started the inning with a double before Walker walked and Starlin Castro singled.

"I walked a guy, and I made three bad mistakes," said Holland, who has blown five saves in 22 opportunities. "Got to be better than that. You can't make many mistakes and expect to win games. We've played too hard to be coughing up games in the ninth inning."

For the first time in club history, Miami had a win with all three runs scored on sacrifice flies.

Jose Quijada (1-3) pitched a scoreless ninth for his first major league victory.

"That's how this game is, if you don't throw pitches where you want to, you end up paying for it," Arizona manager Torey Lovullo said.

Nick Ahmed's RBI groundout in the fourth gave Arizona a 2-1 lead. Ahmed drove in Jake Lamb, who tripled off Miami starter Sandy Alcántara.

Alcántara pitched six innings and allowed two runs, five hits, struck out four and walked three.

Marlins left-hander Jarlin García pitched a perfect seventh, increasing his scoreless innings streak to 18, the longest active by a reliever in the major leagues.

Miami struck early on Walker's sacrifice fly in the first. Walker drove in Miguel Rojas, who reached on a leadoff single and advanced to third on Cooper's single to right.

The Diamondbacks tied it in the second on Greinke's run-scoring double. Greinke's sharp grounder got past third baseman Walker and scored Adam Jones from second.

THE GEM AND THE HIT

Marlins right fielder Brian Anderson made a diving catch to rob Ahmed of a base hit to end the top of the six. Anderson led off the Marlins half of the inning with a double.

"That's baseball and with things that happen right away," Anderson said. "You make a good play on defense and come right away and get a hit. I don't know if it's confidence but I was trying to get the team going. Try to keep the score as low as possible for our guys."

ROSTER MOVE

The Diamondbacks selected the contract of IF-OF Yasmany Tomás from Triple-A Reno. In corresponding moves, the Diamondbacks placed pitcher Taylor Clark on the paternity list and transferred pitcher Luke Weaver to the 60-day injured list, allowing Tomás a spot on the 40-man major league roster.

Tomás grounded out to third in a pinch hit appearance Friday.

TRAINER'S ROOM:

Arizona: RHP Luke Weaver (elbow) was transferred to the 60-day injured list. Weaver also has been cleared to throw from 90 feet, said manager Torey Lovullo.

Miami: RHP Pablo Lopez (shoulder) will make a rehab start at Double-A Jacksonville. Lopez made 14 starts before going on the injured list June 19.

UP NEXT:

Arizona: Rookie LHP Alex Young (3-0, 2.38) will start the middle game of the series for the Diamondbacks. In three previous road outings, Young has won two decisions and limited opponents to a .140 average.

Miami: RHP Jordan Yamamoto (4-1, 2.61) will start Saturday. After winning his first four major league decisions, Yamamoto yielded a career high five runs in a four-inning outing against the Los Angeles Dodgers July 21.

___

More AP MLB: https://apnews.com/MLB and https://twitter.com/AP_Sports