MIAMI — Alexi Amarista gave the San Diego Padres a chance.
Adeiny Hechavarria took it away.
And with that, one light-hitting shortstop stole the thunder from another.
After Amarista tied the game with a two-run home run in the ninth for San Diego, Hechavarria's three-run game-ending homer off Brandon Maurer in the bottom half lifted the Miami Marlins to a 5-2 win and denied the Padres a chance at what would have been their first three-game road sweep since April 2013.
"There's no silver lining in this one," Padres interim manager Pat Murphy said. "Give credit to Miami for going through what they've been going through and coming up big today in the last inning."
Hechavarria's homer came after Amarista — like Hechavarria, a No. 8 hitter — denied Jose Fernandez what would have been a historic win with a tying two-run homer off Marlins closer A.J. Ramos (1-3) in the top of the ninth.
Amarista's homer was his third, Hechavarria's his fifth. According to STATS LLC, it was the eighth time in the last 100 years two No. 8 hitters hit ninth-inning homers.
"You don't expect Hech to hit it out that far," said Fernandez, who struck out 10 and allowed four hits in six shutout innings. "Right off the bat, we knew it was gone."
Maurer (7-4) faced four batters, and three scored.
Until Ramos gave up Amarista's homer, Fernandez was in position to secure a place next to Johnny Allen and LaMarr Hoyt as the only pitchers since 1900 to win their first 16 career home decisions.
The Marlins got a scare in the eighth when Carter Capps left with right elbow stiffness. Capps, who has a 1.16 ERA and 58 strikeouts against just seven walks, said he will have an MRI on Monday, but was told initial tests suggested there's no major issue.
Fernandez threw 112 pitches. He has only topped that once, a 114-pitch outing against the Los Angeles Dodgers on May 4, 2014. The Padres teed off against him five days later, after which it was determined that Fernandez needed elbow reconstruction surgery that kept him out of Miami's rotation for more than a year.
This time, the Padres saw a healthy Fernandez. That's not good for them.
San Diego has faced the Miami ace four times, and hasn't scored off him in three of those — the exception being last year where Fernandez was dealing with the then-not-diagnosed elbow issue and gave up six hits and five earned runs in five innings. Take that away, and San Diego has no runs in 20 2-3 innings against him.
"It was probably a little more personal," Fernandez said of facing the Padres again.
Fernandez escaped a bases-loaded jam in the first, and returned to the mound with a 2-0 lead. Ichiro Suzuki and Miguel Rojas scored after opening with consecutive doubles.
Amarista led off the San Diego fifth with a standup triple, but was stranded. Fernandez struck out Padres starter James Shields, got Will Venable to pop into shallow right and then struck out Yangervis Solarte — who spiked his helmet in frustration.
In the ninth, Amarista left nothing to chance. But Hechavarria did him one better.
"The fact of the matter is that we had a shot to win," said Shields, who allowed two runs and five hits in six innings. "I kept the team in the game but unfortunately it didn't work out our way."
Padres: 2B Cory Spangenberg (left knee) ran the bases pregame Sunday and will report to Double-A San Antonio on Monday. Spangenberg hasn't played since June 27. "He said, 'Look, I think I'm closer than you think,'" Murphy said.
Marlins: 2B Dee Gordon (rest) got the day off. In his place, Suzuki batted leadoff and Rojas played second.
Padres: RHP Tyson Ross (7-8, 3.38) goes Monday when San Diego visits RHP Wily Peralta (2-5, 3.90) and the Milwaukee Brewers. Ross has allowed three earned runs or less in 20 of his 22 starts. The Brewers have won four of Peralta's last five starts.
Marlins: RHP Tom Koehler (8-7, 3.38) starts Monday when Miami hosts RHP Bartolo Colon (9-10, 4.96) and the New York Mets. Koehler has a 2.40 ERA in his last seven outings. Colon is 3-9 with a 6.01 ERA in his last 13 starts.