The final month of the regular season got off to a rocky start for him and the Giants. Samardzija had his worst start of the season and the Giants were in a tailspin.
He and the team righted things Friday night, beating Clayton Kershaw and the NL West-leading Los Angeles Dodgers 5-4.
"I pride myself on September," Samardzija said. "I didn't like how it started and just really need to get back to the drawing board. We were a lot better out there."
Mauricio Dubon went 3 for 4 and drove in three runs in the series opener.
The Giants ended a stretch in which they lost eight of 10 and 12 of 16 on a night when retiring manager Bruce Bochy was honored by the Dodgers in a pre-game ceremony.
"This is, honestly, since I've been here, one of Boch's best years with dealing with a short starting staff, trading away half the bullpen and doing some different things," Samardzija said. "To keep everyone positive and fighting and playing hard, he's done an amazing job this year."
Bochy's record against Los Angeles improved to 219-204 in stints as manager of the Giants and San Diego Padres.
Kershaw (13-5) lost his third straight start for the first time since 2015 for the Dodgers, whose four-game winning streak ended.
"There's a lot of excuses I can come up with in my head," Kershaw said. "Just need to pitch better."
The Dodgers pulled to 5-4 with two outs in the ninth on A.J. Pollock's third homer of the game, a towering shot to left field on the first pitch from closer Will Smith. They have 253 homers on the season, already a NL record.
Smith walked pinch-hitter Russell Martin to put the tying run on base. Smith then struck out catcher Will Smith to end the game and earn his second save.
"I'm sure we'll cross paths in our career a couple more times, so we'll see who wins the Will Smith battle," Smith the catcher said.
Samardzija (10-11) allowed three runs and five hits while striking out three and walking none in his previous outing. He gave up six earned runs over 5 1/3 innings against San Diego last weekend.
Like Samardzija, Kershaw was coming off a disappointing outing. Last weekend at Arizona, Kershaw gave up five earned runs and five hits in five innings.
The three-time Cy Young Award winner exited after four-plus innings and 99 pitches in his shortest start of the season. He gave up three runs and seven hits -- second-most of the season -- struck out six and walked three.
Kershaw needed 17 minutes to get out of a bases-loaded jam in the first.
"I could see his frustration early, couldn't get into a rhythm," Dodgers manager Dave Roberts said. "It was a grind for him."
Kershaw was pulled after a leadoff single to Austin Slater and a walk to Kevin Pillar.
He spoke briefly to Roberts before leaving the mound. Kershaw reached the dugout and, in a rare display of emotion, kicked the cooler under the bench, and then tossed his glove and cap before heading into the clubhouse.
"I just never want to come out," Kershaw said, "especially that early in the game."
Dylan Floro came on and got Evan Longoria on a groundout to first before loading the bases on an intentional walk to Buster Posey. Pinch-hitter Mike Yastrzemski hit a two-run double to deep center field. After another intentional walk to Brandon Belt, Dubon hit a two-run RBI single, extending the Giants' lead to 5-1.
Dubon homered to tie the game 1-all in the fourth.
"He crushed that home run," Bochy said. "What a game he had. I'm sure that's a game he'll remember, first game here at Dodger Stadium."
Pollock slugged solo shots in the second and fifth innings.
Giants: RHP Trevor Gott (right elbow strain) was transferred to the 60-day IL. ... RHP Johnny Cueto, recovering from Tommy John surgery last year, will throw a bullpen session in LA this weekend to see how his back feels after experiencing tightness.
Dodgers: LHP Rich Hill (left forearm strain) faced hitters, tossing 33 pitches. He'll make four starts to build himself up before the postseason begins, with his first one expected to be an abbreviated outing next week at Baltimore.
STRUGGLING IN THE STRETCH
The Dodgers are 7-7 in their last 14 games, while their division lead is 17 games over Arizona.
"A lot of momentum all year long has been starting pitching," Roberts said. "The last two weeks our starters just haven't been consistent."
Besides Kershaw, Hyun-Jin Ryu and Walker Buehler have tailed off recently. Those three are being counted on to pitch deep into postseason games.
Ryu will skip a start in the rotation next week at Baltimore to get some rest, Roberts said. Ryu had a major-league leading ERA of 1.45 on Aug. 11. Since then, his ERA has skied to 9.95 and he's given up five home runs in the four starts since then. Ryu had allowed just 10 in 22 starts before that.
LHP Julio Urias starts Sunday's series finale in place of RHP Walker Buehler. Urias will be limited to three innings and about 45 pitches.
Giants: They've lost each of the last eight starts dating to July 24 by RHP Tyler Beede (3-9, 5.61 ERA). He's 0-6 with a 7.05 ERA in those eight outings.
Dodgers: RHP Tony Gonsolin (2-1, 2.89) has held batters to a .200 average in six major league games, including five starts.
More AP MLB: https://apnews.com/MLB and https://twitter.com/AP-Sports
Pollock homers three times in Dodgers' loss
A.J. Pollock gets a hold of his 11th, 12th and 13th home runs of the season, but the Dodgers still fall to the Giants 5-4.