After pulling even at 2 in the fifth inning, the Marlins claimed a two-run lead in the sixth inning on Realmuto's two-run single with the bases loaded and two outs off Sam Tuivailala.
Jaime Garcia held the Marlins hitless for 4 1/3 innings before Realmuto's single in the fifth. Adeiny Hechavarria delivered an RBI double in the inning, and Miami pulled even at 2 on Chris Johnson's groundout.
Fernandez worked 3 2/3 innings, allowing two runs on five hits with six strikeouts.