PITTSBURGH — Jacob Stallings hit a three-run double in the eighth inning, lifting the Pittsburgh Pirates to a 5-3 victory over the Miami Marlins on Thursday night.

Trailing 3-2, the Pirates loaded the bases with two outs on a single by NL hits leader Adam Frazier and walks to Bryan Reynolds and Gregory Polanco. Stallings then doubled to left against Dylan Floro (2-3), sending the Marlins to their season-high sixth consecutive loss.

Stallings fell behind 0-2 before working the count full.

“He grinds through at-bats,” Pittsburgh manager Derek Shelton said. “When you continue to extend at-bats by fouling off pitches, you give yourself a chance to make the pitcher make a mistake. That’s why he is so good in the clutch.”

Stallings has shown a knack for getting big hits in the late innings throughout his six-year career, especially at PNC Park. He does not have an explanation for his success.

“Opportunities maybe?” he said. “It if was something I could take to my other at-bats, I’d definitely do it. I’ve been in the right spot at the right time and luckily I’ve been able to come through a few times.”

Reynolds also homered for the Pirates, who stopped a three-game slide. Rookie Ke’Bryan Hayes, fresh off the injured list, had two hits.

Reynolds has hit four homers in the last eight games, raising his season total to eight.

Kyle Crick (1-0) pitched a scoreless eighth for the win, and Richard Rodriguez worked around a two-out single in the ninth for his seventh save.

Marlins starter Elieser Hernandez was activated from the IL after missing two months with a strained right biceps, and then got hurt again.

Hernandez strained his right quadriceps while running the bases in the sixth inning when the Marlins scored twice to take a 3-1 lead. The right-hander limped home while scoring from third on Jesus Aguilar’s soft groundout, and then collapsed once he crossed home plate.

Hernandez is expected to undergo imaging tests today.

“Obviously, it didn’t look good when you see a guy go down like that and it’s going to be more than just a day-to-day thing,” Miami manager Don Mattingly said. “You feel bad for the kid. He’s been battling to get back. It’s been a long road back for him. He threw the ball good. It’s just tough.”

Hernandez allowed three hits in five innings. He struck out six and walked none.

The Pirates got one back in the bottom of the sixth. Hayes tripled with one out and scored when shortstop Jazz Chisholm Jr. mishandled Reynolds’ grounder.

Pirates starter Tyler Anderson allowed three runs and five hits in 51/3 innings. He struck out four and walked none.

Jon Berti had two hits for the Marlins.

HAYES RETURNS: Hayes had been out since spraining his left wrist in the second game of the season. Last year, the son of longtime major league third baseman Charlie Hayes hit .376 with five home runs in 24 games.

“It felt great,” Hayes said. “I was out for what seems like half a year. Just to be back out there with the guys and the fans cheering us on was great and it was also great to get the win.”

MARTE RETURNS, TOO: Marlins center fielder Starling Marte went 1 for 4 with a double in his first appearance as a visiting player in Pittsburgh. He played for the Pirates from 2012-19 before being traded to Arizona.

A video tribute was played on the scoreboard before he batted in the first inning and Marte received a warm ovation. He tipped his cap and patted his heart.

ROSTER MOVE: The Pirates reinstated right-hander JT Brubaker from the bereavement list and optioned right-hander Wil Crowe to Triple-A Indianapolis.

Brubaker will be added to the active roster once he clears the COVID-19 intake process. Crowe was 0-4 with a 7.26 ERA in eight games.

TRAINER’S ROOM: Pirates right-hander Jose Soriano (right elbow discomfort) has had his rebab assignmen t with Class-A Bradenton paused. He is returning from Tommy John surgery.

Indianapolis center fielder Travis Swaggerty, the Pirates’ first-round draft pick in 2018, underwent season-ending surgery on his dislocated right shoulder.

UP NEXT: Marlins rookie Cody Poteet (2-1, 2.95 ERA) will start against fellow right-hander Mitch Keller (3-6, 6.54 ERA) tonight.

Poteet will be making his fifth career start.

Keller stopped a three-start losing streak in his last outing when he pitched five shutout innings against Colorado.

Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.