MIAMI (AP) -- Jose Fernandez pitched seven scoreless innings to help the Miami Marlins beat Gerrit Cole and the Pittsburgh Pirates 3-1 on Tuesday night.

Christian Yelich had a tiebreaking RBI single in the seventh, J.T. Realmuto had three hits for the Marlins, and A.J. Ramos pitched a shaky ninth for his 16th save.

Miami's Ichiro Suzuki had two hits to tie Sam Crawford for 31st on MLB's all-time hit list with 2,963.

More from FoxSports

Fernandez (8-2) struck out six and gave up three hits while throwing 62 of 88 pitches for strikes. He improved to 22-1 at home and lowered his season ERA to 2.53.

Cole (5-4) allowed three runs and nine hits in 6 1-3 innings. He struck out four and walked two.

Ramos loaded the bases in the ninth with no outs. Gregory Polanco, who hit a grand slam in Monday's 10-0 win, hit a sacrifice fly to deep center field to cut the deficit to 3-1.

Ramos then struck out Jung Ho Kang and Starling Marte flied out to end the game with two runners on.

The Marlins broke a scoreless tie with three runs in the seventh inning. Suzuki and Realmuto singled with one out before Yelich's base hit to right scored Suzuki.

A wild pitch by Cole allowed Realmuto to score and Justin Bour's groundout extended the lead to 3-0.

Fernandez was in complete control allowing only one baserunner in scoring position.

Cole got out of a bases loaded jam with one out in the sixth when Chris Johnson lined out to second and Adeiny Hechavarria hit a soft fly ball to right field.

HURDLE STILL MARVELING

Pirates manager Clint Hurdle was thoroughly impressed the day after Monday's 10-0 win.

"All in all that may have been the best game I've ever watched in a Pirates uniform," Hurdle said before Tuesday's game. ".The ability for us to defend the way we did, the ability for Jeff (Locke) to pitch the way he did, and the ability for us to maintain dominance in the box the way we did last night -- all of those three facets played out incredibly well for me."

TRAINER'S ROOM

Marlins: RF Giancarlo Stanton (right side soreness) missed his seventh consecutive games although manager Don Mattingly said before the game Stanton would likely be available to pinch-hit. . LHP Mike Dunn (forearm) was reinstated from the DL and is looking to make his season debut. . RHP Bryan Morris (back) will undergo surgery, but Mattingly is hopeful he will be able to return before the end of the season.

UP NEXT

Pirates LHP Jonathon Niese (5-2, 4.42 ERA) will start the third game of the series on Wednesday. Niese is 5-0 with a 3.74 ERA in his last nine starts against Miami, all as a member of the Mets.

Marlins LHP Adam Conley (3-3, 4.15) will start Wednesday's game in search of his second quality start in his last six outings after 7 2-3 no-hit innings at Milwaukee on April 29.