SAN FRANCISCO -- Statistically one of the worst pitchers in baseball the past three seasons, San Francisco right-hander Matt Cain must be excused if he was more than a bit nervous Monday in the ninth inning of the Giants' series opener against the Los Angeles Dodgers.
After all, Cain was in the trainer's room, having a strained hamstring massaged after just undergoing an X-ray taken on a painful right foot.
And with the potential tying run at second base and a 3-1 count on Dodgers slugger Adrian Gonzalez, Cain had even more reason to be worried.
San Francisco Giants (@SFGiants) April 25, 2017
"We're worried about the 3-1 count on Gonzalez," Cain said of his view of the last-pitch dramatics on television. "Then (Posey) comes up with that missile. That's not something you see very often."
"Anytime you come off a horrible series up there in Colorado, you're glad to be home," Giants manager Bruce Bochy said. "This does a lot for the club. I thought tonight was a huge game for us."
Cain, whose 5.64 ERA was the eighth highest in the majors last season among pitchers with more than 15 starts, threw his third consecutive strong game, allowing only two hits and one walk. He struck out three.
He pulled himself from the game after six innings, fearing a balky hamstring that had lingered in 2016 had started acting up again.
"Definitely very difficult," Cain said of coming out with a 1-0 lead. "But I was trying not to be selfish and put somebody in a bad situation."
The postgame news also was good for Cain. X-rays on his foot, hit by a line drive off the bat of Yasmani Grandal in the fourth inning, were negative. And he also reported that his hamstring was already feeling better.
The win over the Dodgers was Cain's first since May 5, 2013. He has now allowed just two runs in his past three starts, all of which resulted in Giants wins.
"That's who we are -- strong pitching and defense," Bochy said. "That's gotten away from us. Sure, we'd love to get the bats going. But thanks to Matty, we had enough tonight."
Ahead 1-0, the Giants scored the difference-making run in the seventh inning on a two-out, two-strike single by Pence that scored Panik, who had led off the inning with a single.
The run came against the Los Angeles bullpen after starter Hyun-Jin Ryu left trailing 1-0 after six innings.
Ryu limited the Giants to one run and five hits in six innings. He walked one and struck out three.
"It was the best outing I had since the surgery," said Ryu, who missed most of the last two seasons due to labrum and elbow procedures. "I really wanted to make sure that they didn't get extra bases or a home run off me, because that's been one of my problems this season. Everything worked out really well."
However, with the potential tying run aboard, Derek Law, the fourth Giants pitcher, struck out Andrew Toles before Posey gunned down Taylor trying to steal to end the inning.
Mark Melancon pitched around a one-out bloop hit by Turner and a two-out wild pitch in a scoreless ninth for his fourth save, the game ending on Posey's throw behind Turner at second.
"I'm sure that's happened before," noted Bochy, a former catcher. "I just don't recall the last time I saw it."
The single by Turner extended his hitting streak to 10 games.
"It's just one of those plays where he's reading the swing and he's trying to get a jump on the baseball with two outs to make sure he scores," Dodgers manager Dave Roberts said. "Buster, heads-up play throwing behind the runner. (Turner) was just being aggressive, and he got caught in no-man's land."
Pence, Posey and Brandon Crawford had two hits apiece for the Giants (7-13), who have beaten the Dodgers six straight times in San Francisco.
Utley reached base twice on walks for the Dodgers (9-11), who lost for the third time in four games on their current seven-game trip.
The Giants, who opened a seven-game homestand, out-hit the Dodgers 8-4.
NOTES: Before the game, Giants LHP Madison Bumgarner made his first public comments about his dirt-bike accident last week in Denver, insisting he hadn't been speeding or doing stunts when he crashed and sustained bruised ribs and a sprained shoulder. Bumgarner gave no timetable for his return. ... Bumgarner's spot in the Giants' rotation will be taken by LHP Ty Blach, who is scheduled to oppose Dodgers LHP Clayton Kershaw in Game 2 of the series Tuesday. ... The Giants made a series of roster moves before the game, promoting 3B Christian Arroyo and OF Drew Stubbs from Triple-A Sacramento to replace INF Aaron Hill (disabled list, strained right forearm) and LF Chris Marrero (designated for assignment). Arroyo and Stubbs both started the game and went a combined 0-for-6. ... The Dodgers placed CF Joc Pederson (strained right groin) on the 10-day DL before the game and recalled OF Brett Eibner, who had been demoted Sunday, from Triple-A Oklahoma City. ... Dodgers manager Dave Roberts announced before the game that LHP Julio Urias, who began the season at Triple-A, will start Thursday's series finale, with RHP Kenta Maeda pushed back to Friday against Philadelphia.