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
Active bats help Royals dominate Yankees 6-1
Solo home runs from Jorge Soler and Ryan O'Hearn, combined with a big-time double off the center-field wall by Whit Merrifield lift the Royals past the Yankees 6-1.
Bailey wins consecutive starts, Royals beat Yankees 6-1
Homer Bailey won consecutive starts for the first time since July 2017, holding the New York Yankees to three hits over six innings and leading the Kansas City Royals to a 6-1 victory Thursday night.
Yanks drop Smith's 'God Bless America' recording
The Yankees are "erring on the side of sensitivity" and have stopped using Kate Smith's recording of "God Bless America" while they investigate an allegation of racism against the late singer.
Red Sox's Pedroia (knee) headed to injured list
Red Sox second baseman Dustin Pedroia will be placed on the 10-day injured list with irritation in his surgically repaired left knee, the team announced Thursday.
Nats' Sanchez faces off with Marlins, his first team
Anibal Sanchez broke into the majors in 2006 as a member of the Marlins, and he pitched a no-hitter that season.
Rangers option lefty Bird to Triple-A Nashville
The Texas Rangers have optioned left-hander Kyle Bird to Triple-A Nashville after his second stint in the majors this season.