SAN FRANCISCO -- After two games filled flaring tempers and alleged beanballs, the Giants and Marlins finally learned to play nice together in their season series finale.
Just the way San Francisco manager Bruce Bochy expected -- or at least hoped.
"I didn't think it would continue," Bochy said. "You're going to have games like that and tempers are going to flare. Boys will be boys, as they say, but it's back to baseball."
In comparison to the games Monday and Tuesday when both teams were chippy, Wednesday's game was tame.
There were more errors than hit batters and the only damage was self-inflicted when Giants leadoff hitter Alen Hanson fouled a ball off his left knee in the first inning.
What fireworks there were came primarily in the sixth when San Francisco chased Miami starter Jose Urena (2-9).
Panik scored the go-ahead run when Mac Williamson hit a sharp grounder to third baseman Miguel Rojas with one out. Rojas made a diving stop but second baseman Starlin Castro had to stretch for the throw and was unable to make the relay to first.
Hernandez capped the inning with a two-run single after a 14-pitch at-bat against Urena.
"He really grinded out that at-bat," Bochy said. "Just came through with a huge hit there and gave us a cushion."
Derek Holland (5-7) had seven strikeouts and allowed three runs over six innings in his first start against the Marlins since 2011. He walked two and left after giving up back-to-back hits opening the seventh.
"(Catcher Nick Hundley) and I did a great job establishing what we needed to, getting ahead of hitters," Holland said. "I know the line says I gave up three runs but at the end of the day these guys did a good job of keeping the momentum on our side."
The Giants' left-hander said he changed his stance on the mound, shifting from one side of the rubber to other.
"Just wanted to do something different, that's all," Holland said.
Castro drove in a pair of runs and Brian Anderson had three hits for Miami, extending his on-base streak to a career-high 18 games.
The Marlins hit into three double plays, including when Urena was doubled up at first after mistakenly heading for third on Castro's fly ball to center with no outs in the third.
"I've never seen a guy be the leadoff hitter and then lose count of the outs," Miami manager Don Mattingly said. "He was hustling though. We had some other chances too."
"That's cute. I remember my first 14-pitch at-bat." -- Belt, who set a major league record with a 21-pitch at-bat against the Angels on April 22, talking about Hernandez's long at-bat in the sixth.
Marlins: Outfielder Garrett Cooper (wrist) was sent to Triple-A New Orleans to begin a rehab assignment.
Giants: Hanson had to be helped off the field and was diagnosed with a knee contusion after undergoing X-rays. ... Buster Posey was given the day off. ... RHP Jeff Samardzija (shoulder tightness) makes his second rehab start with Triple-A Sacramento on Thursday.
Marlins: Following a day off Thursday, Miami heads to Colorado to begin a three-game series. LHP Wei-Yin Chen (2-3, 5.91 ERA) pitches the opener seeking his second win against the Rockies this season.
Giants: LHP Madison Bumgarner (0-2, 4.67) faces San Diego on Thursday night in the opener of a four-game series. Bumgarner has lost four straight to the Padres.
More AP baseball:�https://apnews.com/tag/MLBbaseball
Angels minor leaguer Aaron Cox, who was Mike Trout's brother-in-law, died Wednesday at age 24. No cause of death was announced.
For the St. Louis Cardinals, it was another night of gaining ground in two races. For the Washington Nationals, it was another night where opportunity slipped away, much like their season.
Prepare your fantasy baseball lineups with confidence with our daily preview, including pitcher projections, hitter matchup ratings and more.
Major League Baseball will be adding five new teams -- Angels, Dodgers, Phillies, Pirates and Rangers -- to the bullying prevention initiative Shred Hate.
After one splashy offseason move, the Sox have gone from good to an all-time-great team. We break down how much of the rise can be credited to Boston's new slugger.
As infielders, outfielders and backup catchers take the mound in record numbers in major league baseball, here are the stats to know behind the rise.