MIAMI — After hitting two doubles and a triple in Friday's game, Hunter Pence admitted he was frustrated that he hadn't homered in over a month.
Pence broke through with a home run in his first at-bat Sunday, and drove in three runs for the Giants in a 6-5 loss to the Miami Marlins.
"There were a lot of big hits, but at the end of the day, we didn't get the win," Pence said. "It was a tough loss."
It was his first home run since July 13 at San Diego, a span of 111 at-bats. He has 15 this season.
"I'm sure it was a little bit of a load off his mind hitting that one today," Giants manager Bruce Bochy said. "He had a good at-bat, took a good swing and certainly smoked that one."
Despite the homer drought, Pence is batting .328 (22-for-67) with seven doubles, three triples, one home run and 13 RBIs in August.
"The focus is on each individual at-bat, so when you don't [hit a home run] for a long time, that can be frustrating, but it doesn't change the constant of being ready for the next at-bat and the next at-bat after that and trusting that eventually it will happen," Pence said.
Jeff Mathis hit an early home run, then lined a tiebreaking double in the eighth inning that bounced off Giants center fielder Andres Torres to help lift the Marlins.
There was "a little bit of luck there today for us," Marlins manager Mike Redmond said. "We scored a couple runs on some wild hops and a wild pitch, but, hey, we'll take it."
It was 5-5 in a back-and-forth game when Ed Lucas led off the eighth with a single against Sandy Rosario (3-1). With one out, Mathis hit a liner to left-center and the ball dropped in front of Torres' dive and caromed off him.
"When I was getting ready to dive, my foot kind of got stuck in the ground and I missed the ball," Torres said. "It just got away from me and kept rolling."
Chad Qualls (4-1) pitched 1¹⁄³ scoreless innings and Steve Cishek worked the ninth for his 27th save in 29 chances.
Hector Sanchez singled with one out in the ninth before Buster Posey grounded into a game-ending double play. Brandon Crawford also hit a home run and Gregor Blanco had three hits for the Giants.
Miami starter Tom Koehler allowed three runs and seven hits in five innings.
Crawford led off the seventh a home run against Mike Dunn, tying it at 4. Sanchez hit a go-ahead double later in the inning that put the Giants ahead.
Guillermo Moscoso, who struck out the side in the sixth, allowed an RBI double by Donovan Solano in the seventh to tie game at 5.
After Pence's homer, Mathis hit a solo home run in the third off Madison Bumgarner to cut the Marlins' deficit to 2-1.
Back-to-back RBI singles by Lucas and Adeiny Hechavarria in the fourth gave Miami a 3-2 lead.
"It seemed like every pitch I threw today was just a hair off and in the wrong direction," said Bumgarner, who allowed four runs in five innings. "It was just kind of frustrating for me today."
Pence tied it at 3-3 with an RBI single in the fifth, his eighth RBI in the three-game series.
Miami regained the lead at 4-3 in the fifth on a wild pitch by Giants starter Madison Bumgarner.
"There were balls bouncing everywhere today," Bochy said. "We gave up too many runs and missed a couple of good opportunities. The wild pitch there that we allowed a run to score on, and the bounce off Andres. ... We let this one get away, the way I look at it."
NOTES: The home run sculpture in the outfield got jammed and did not go off after Mathis' home run. ... Since 2010, Blanco is hitting .470 (31 for 66) with five doubles, three triples, and eight RBIs in 18 games against the Marlins. ... Giants CF Angel Pagan had another rehab game with the Giants' Arizona-rookie level team on Saturday. The goal for Pagan to return to the big league club by Sept. 1.