MIAMI (AP) JB Shuck couldn't help but smile when he got to first base with his career-high fourth hit of the game.
''It was a good feeling to get back, have some good at-bats, get some hits, and it was just a loosening-up moment,'' Shuck said.
Shuck's night started with a triple off the right-field wall. He followed with three singles and scored twice.
''That was nice to get a little shot in the arm from JB there,'' Marlins manager Don Mattingly said. ''Didn't really expect four, but we liked what we saw in spring training.''
Justin Bour homered and drove in two runs and Miguel Rojas added three hits for the Marlins, who snapped a three-game losing streak.
''Getting a big win like that, that was a pretty good first day,'' Shuck said.
Miami posted season highs in runs and in hits with 14.
''I think the offense has been pretty good. We've been putting pretty good at-bats together,'' Rojas said.
Dillon Peters (2-1) allowed two runs on four hits in six innings.
Chad Kuhl (1-1) worked five innings and allowed 11 hits and five runs, four of them earned.
''Flares and bloops, balls that were hit hard didn't have the angles, kind of singled to death,'' Kuhl said.
The Pirates, who entered leading the NL in batting, slugging and runs scored, were held to five hits.
''We got in offensive counts like we have all season,'' Pirates manager Clint Hurdle said. ''(Peters's) fastball was just beating us, just beating us, just beating us. A lot of balls in the air. Give him credit. We weren't able to sync up and square him up.''
Elias Diaz homered in the fifth, driving in both of Pittsburgh's runs for a 2-1 lead.
The Marlins scored three runs in bottom half of the fifth on an odd play when Starlin Castro hit a sacrifice fly with the bases loaded. After receiving the throw home, Diaz sailed a throw to second into center field with nobody in the vicinity to track down his mistake. The errant throw allowed two more runs to score.
''When I threw it, I thought, `Oh my God,''' Diaz said.
Lewis Brinson snapped a string of 26 hitless at-bats with a single in the sixth, chasing Kuhl.
Bour's two-run homer to right, his third of the season, extended Miami's lead to 7-2 in the seventh.
Pirates third baseman David Freese played in his 1000th career game. Freese was the 2011 World Series MVP and was an All-Star in 2012.
''He makes it look easy and it's not,'' Hurdle said. ''That was his 1,000th major league game today. Pretty cool testament - not many guys get to do that.''
Bour is 4 for 11 with three home runs and six RBIs in his last three games after going 6 for 37 without a homer and two RBIs in his first nine games.
Marlins: C J.T. Realmuto (back) will begin a rehab assignment with Single-A Jupiter on Saturday. ... RHP Dan Straily (forearm) allowed seven runs in 2 2/2 innings in a rehab assignment with Jupiter on Friday. ... OF Garrett Cooper (wrist) was placed on the 60-day disabled list.
Pirates: RHP Jameson Taillon (2-0, 1.26 ERA) will pitch the second game of the series on Saturday. In his previous start, Taillon threw a one-hitter in a 5-0 win over the Cincinnati Reds.
Marlins: RHP Trevor Richards (0-1, 8.64) did not complete five innings in either of his first two starts.
More AP baseball: https://apnews.com/tag/MLBbaseball
Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.