SAN FRANCISCO -- After enduring a scarcity of scoring during a five-game losing streak, the San Francisco Giants ended both slumps Friday night by rapping 14 hits and receiving a balanced effort from right-hander Jeff Samardzija in an 8-1 triumph over the Miami Marlins.
The Giants never trailed after scoring three first-inning runs, nearly equaling the total of four that they mustered in the first innings of their previous 17 games. They also scored two runs or fewer four times during their losing streak. But their first-inning outburst began a rough evening for Miami starter Jarred Cosart, who surrendered six runs and eight hits in 4 1/3 innings.
"He's just having trouble settling in, it seems like, and having trouble finding the strike zone," Marlins manager Don Mattingly said of Cosart. "He gets behind in the count and all of a sudden you're in trouble. As much as anything, it's just trying to get him going early, and he's having trouble getting out of the gate."
Making his first AT&T Park appearance as a Giant after starting three games on the road, Samardzija complemented his 7 2/3-inning performance with impressive offense, as he stroked a fifth-inning RBI single and added a two-run double one inning later.
"Being patient at the plate allowed me to be more comfortable and relax a little bit," Samardzija said.
MOMENTS THAT MATTERED Quick start: Having struggled offensively for most of the past week, the Giants needed to assert themselves immediately at the plate. They did so in this series opener against Miami with their trio of first-inning runs, courtesy of Matt Duffy's sacrifice fly, Brandon Belt's RBI single and Brandon Crawford's fielder's-choice grounder.
"I don't think it hurts to score first," Belt said. "It lets the pitcher relax and do his job, and the offense relaxes a little bit."
Wild night for Cosart: Throwing strikes has been a struggle for Cosart in all three of his starts. His night started with a four-pitch walk to Denard Span. Cosart finished with six walks (two intentional) in 4 1/3 innings. For the season, Cosart has now walked 15 in 14 2/3 innings, including back-to-back starts with six free passes. Despite his wild streaks, Cosart was able to keep the score within reach, 3-1, entering the fifth. But after issuing an intentional walk to Crawford to load the bases with one out, Samardzija made Miami pay with an RBI single to right. Cosart was lifted after 102 pitches, with 52 for strikes.
"I'm just kind of feeling out of sync and out of whack," Cosart said. "I'm talking with [pitching coach Juan Nieves] to see if I can go back to what was working. I just feel kind of out of sync, uncomfortable with all my pitches.
"I just feel like I have a lot of different moving parts and things that I'm thinking about, and it just isn't natural. I'm going to see if I can get back to what was working starting tomorrow. I just can't keep having to think about something that's not natural for me."
Hitting when it counts: After batting .086 (3-for-35) with runners in scoring position during their losing streak, the Giants improved in this game by collecting five hits in 18 at-bats with men on second base or beyond. They still left 12 runners on base, indicating this could have an even more fruitful offensive effort.
Yelich's triple doubles: The Marlins didn't manufacture much offense. But one of their tough outs was again Christian Yelich, who matched a franchise record with three doubles. In the fourth inning, Yelich laced a two-base hit to left-center and scored on Justin Bour's single to center. After getting a pair of doubles off Samardzija, the Giants went with lefty Javier Lopez to face Yelich in the eighth inning. The Miami left fielder responded with a two-base hit to right. It marked the 24th time a Marlin has had three doubles in a game, with the last being Marcell Ozuna on May 15, 2015, against the Phillies. Yelich has reached safely in all 15 games this season and had hits in 12 of them, raising his batting average to .400.
"You just try to put together good at-bats and swing at good pitches," Yelich said. "That's all you can really ask for, and hopefully it will find some holes."
"That's why it's important to kind of get out to some leads. I guess we've got to do a better job of that. If we don't, we have to battle all night and try to keep ourselves in it." -- Yelich on Miami frequently playing from behind early
In his 15th game at the helm, Don Mattingly was ejected for the first time as Marlins manager. Home-plate umpire Brian Gorman threw Mattingly out in the fourth inning. It was the 20th time he's been tossed as a manager, counting 19 in five seasons helming the Dodgers.
WHAT'S NEXT Marlins:Jose Fernandez, whose 14.58 strikeouts per nine innings ratio is tops in the Majors, will make his first start at AT&T Park on Saturday at 9:05 p.m. ET. The 23-year-old has faced the Giants once in his career, last July 2 in a win in Miami.
Giants: Still recovering from yielding 10 extra-base hits two starts ago -- a San Francisco-era franchise record -- Jake Peavy will face off against the Marlins on Saturday beginning at 6:05 p.m. PT.