Jesus Aguilar hit a long solo home run and added a sacrifice fly for Miami.
Alcantara (3-5) gave up one run and six hits, striking out six. The right-hander allowed a leadoff double to Adam Frazier in the eighth, but retired the next three batters to finish his outing.
''We are like a family here,'' Alcantara said. ''We support each other. I think we've been doing a great job. There's been a lot of people getting hurt. That can happen. You can do nothing about it. We just have to keep positive and keep working hard.''
It was the second time in his past three starts that Alcantara went eight innings.
The Marlins last lost eight straight from May 15-22, 2015. They blew two eighth-inning leads in the first three games this series, a one-run lead in a 5-3 loss Thursday and a three-run lead before losing 8-7 in 12 innings Saturday.
''Obviously, it felt good,'' Marlins manager Don Mattingly said. ''This thing builds and builds. You don't really think about it early on, but as it starts to grow and you've lost a couple of tough games, it creeps in there. It creeps into your team. It's good to get one on the board.''
Yimi Garcia pitched a perfect ninth inning for his 10th save.
Pirates starter Chad Kuhl (0-3) allowed two earned runs and three hits in six innings.
''Hot day, felt like I conserved pitches,'' Kuhl said. ''Felt like I kept my pitch count in a good spot. ... Felt great. Felt like I had 100 pitches in the tank.''
Shortstop Erik Gonzalez fumbled a toss while covering second after Corey Dickerson grounded to Frazier at second base in the sixth, letting the Marlins take a 2-1 lead. Jazz Chisholm Jr. scored from second, though he had some trouble running home after getting hit on right foot with pitch to reach base.
''(Frazier) got aggressive on it. I actually think he made the right play,'' Pirates manager Derek Shelton said. ''(Gonzalez), as we've seen, is elite. It's just a tough play.''
Aguilar followed with a sacrifice fly to tack on another run. He hit a 444-foot home run, his 12th, into the left field bleachers to tie it 1-all in the second.
''We've been playing good,'' Aguilar said. ''A couple of adjustments today. That's what we have to do. Keep playing. This game is not easy, but I think we've got the right guys. We just have to keep going.''
After giving up an RBI double to Colin Moran in the first inning, Alcantara didn't get into trouble again until the fifth, when Ben Gamel led off with a ground-rule double. Michael Perez grounded to first, Kuhl struck out with Gamel on third and Frazier grounded out to end the inning.
Moran was activated from the 10-day injured list Sunday after being out since May 8 with left groin discomfort.
''I felt comfortable,'' Moran said. ''Obviously, first inning after being out a while, it's nice to get a little action over there. I thought it was like it always happens, it always finds a guy. That first at bat was kind of just getting a ground ball, getting into the game and get things going.''
Pirates INF Cole Tucker was optioned to Triple-A Indianapolis. He was 2 for 15 with an RBI in eight games (three starts) with Pittsburgh this season.
Marlins: Chisholm could have some swelling, but should be able to play against the Boston Red Sox on Monday, Mattingly said. ... INF/OF Garrett Cooper missed a second straight game with back stiffness.
Pirates: RHP Mitch Keller was placed on the COVID-IL list. . LHP Austin Davis (left elbow sprain) was reinstated from the 60-day injured list. He retired the side in order when relieving Kuhl in the seventh.
Marlins: RHP Pablo Lopez (1-3, 2.82 ERA) will take the mound in Boston against the Red Sox on Monday, making up a game postponed May 30. Despite having just one win this season, Lopez has allowed fewer than three runs in 10 of 12 starts.
Pirates: RHP JT Brubaker (4-4, 3.74) is in line to start against the Los Angeles Dodgers on Tuesday, the first of a three-game set. Brubaker gave up four hits in six shutout innings his last time out against the Colorado Rockies on May 29.
More AP MLB: https://apnews.com/hub/MLB and https://twitter.com/AP-Sports
Copyright 2021 STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.