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
Mike Napoli, who made three trips to World Series, announces retirement
Veteran Mike Napoli announced Saturday that he is retiring from baseball, ending a 13-year career highlighted by three trips to the World Series.
Senate follows House in passing bill to honor pioneer Larry Doby
With the Senate joining the House in passing legislation, Larry Doby, the AL's first black player, just needs President Donald Trump's signature to be awarded the Congressional Gold Medal posthumously.
Buster's Buzz: Never say never on Harper going back to the Nationals
Other teams might seem more likely to land Bryce Harper, but he wouldn't be the first Boras client to shop around before re-signing with his original club.
How much money could be spent in Vegas on free agents?
In trying to figure out what kind of megadeals could be struck at the winter meetings, we look back at the history of big-money, free-agent contracts.
After stint in South Korea, Merrill Kelly signs with Diamondbacks
Right-hander Merrill Kelly is joining his hometown Arizona Diamondbacks, agreeing to a $5.5 million, two-year contract after spending the past four years pitching in South Korea.
Kurkjian lists Harper's top three landing spots
After Nationals owner Mark Lerner said he doesn't expect Bryce Harper to re-sign with Washington, Tim Kurkjian names the top three destinations for Harper.