PITTSBURGH -- Perhaps Russell Martin should be known as the Wizard of Walk-offs.
The Pirates catcher singled in the winning run as a pinch-hitter in the bottom of the 10th inning on Thursday afternoon, rallying Pittsburgh from a four-run deficit to a 5-4 victory over the Miami Marlins at PNC Park.
It was Martin's fourth walk-off in his first season with the Pirates, who improved their record to 70-44, the best in the major leagues, with their fifth straight win.
Josh Harrison led off the 10th with a single against Steve Ames (0-1) and was bunted to second by Clint Barmes. After an intentional walk to Starling Marte, Martin singled down the left-field line to complete a sweep of the three-game series.
"I like those situations," Martin said. "Some people would say they are pressure situations, but I don't look at it that way. There is a heightened focus for me when the game is on the line and I feel more relaxed because of it. I feel I perform better with the game on the line."
The Pirates have 28 comeback wins this season and nine walk-offs.
"It's just our mindset," Pittsburgh manager Clint Hurdle said. "Offensively, we know we've got some work to do and areas to improve on, but we're long on guts. We keep playing to the end and grinding out at-bats. We've shown the resolve to play out some big opportunities."
Center fielder Andrew McCutchen added, "We're like the Miami Heat. We play better in the second halves of games."
Neil Walker had three hits and two RBIs for Pittsburgh and Marte had two hits and two walks.
"It's been so much fun," said Walker, who went 11-for-23 against the Marlins this season. "It seems like it's somebody different every day that's been the hero."
Marlins rookie left fielder Christian Yelich had three hits, including his first major-league home run. Placido Polanco and Jeff Mathis added two hits each.
Both rookie starting pitchers lasted five innings.
The Marlins' Jose Fernandez gave up two runs and five hits while walking four and striking out five, needing 101 pitches to get his 15 outs. That came after he had a combined 27 strikeouts in his previous two starts -- 13 against the Pirates on July 28 then 14 against the Cleveland Indians last Friday.
"It was a tough one today for sure, no doubt," Fernandez said. "I threw a lot of pitches. There was a lot of work out there. We played a good game -- they came out on top, but we played a good game and I gave my team a chance to win, so that's what I care about."
Pittsburgh's Gerrit Cole allowed four runs and six hits with one walk and four strikeouts. Jared Hughes (2-2) pitched one scoreless inning for the victory as four relievers combined for five shutout innings.
"It's a real luxury to have the type of bullpen we have," Cole said. "I feel bad because I hung them out to dry, but they did a great job."
The Pirates tied the score 4-4 on sacrifice flies by Walker and pinch-hitter Gaby Sanchez in the seventh inning. They had drawn within 4-2 in the fifth on consecutive RBI singles by Walker and Pedro Alvarez.
The Marlins, who lost their fifth straight game, loaded the bases in the eighth, but Justin Wilson got Mathis to hit an inning-ending foul out to keep the score tied.
Miami built a 4-0 lead by scoring twice in the first and fifth innings.
Giancarlo Stanton drove in the game's first run with a double and scored on Polanco's single before Yelich hit his home run in the fifth, a drive into the left-field stands.
"You've had a few at-bats now and you know you're waiting for it to come," Yelich said, "but it's one of those things that you can't force it and start pressing for it because if you do that it can take you out of your game and it snowballs on you real quick. It was nice to get that first one, but it would have felt a little better if we could have come up with a W."
NOTES: McCutchen was scratched because of right shoulder discomfort but hit a single as a pinch-hitter in the seventh inning, making him 11-for-17 (.643) in his last six games. Marte, normally the left fielder, started in center field, Alex Presley started in left instead of right and INF/OF Josh Harrison made his second straight start in right. ... Miami 2B Donovan Solano was not in the lineup for the first time since July 23, the day after INF Derek Dietrich was optioned to Double-A Jacksonville. INF Ed Lucas shifted to second base from third base and Polanco started at third. ... Marlins rookie CF Jake Marisnick, who has one extra-base hit in his first 52 at-bats, got the day off and OF Justin Ruggiano started in center. ... Both teams open three-game road series on Friday night with Miami visiting Atlanta and Pittsburgh playing at Colorado. RHP Justin Turner (3-3, 2.68 ERA) will start for the Marlins against RHP Brandon Beachy (0-0, 9.00). Pittsburgh LHP Francisco Liriano (12-4, 2.04) will face LHP Jorge De La Rosa (10-6, 3.31).