SAN FRANCISCO -- Matt Cain's night went bad quickly in the fifth inning, a recurring theme for the Giants' pitcher so far this season.
It wasn't much better for San Francisco's offense, either.
Cain battled early control problems then gave up five hits and three runs in the fifth, while the Giants managed just six hits and were shut out for the first time this season in a 3-0 loss to the Arizona Diamondbacks on Tuesday night.
"I just seem to be making mistakes in that fifth inning and it keeps getting me," said Cain, who walked four and struck out two. "I just didn't manage the inning right. I think we had the right idea of what we wanted to do. I just didn't execute some of the right pitches."
In three starts, Cain has allowed 11 runs over 15 1/3 innings this season. All 11 runs have come in the fifth inning - three by the Diamondbacks, six by the Rockies on April 14 and two by the Dodgers on April 8.
The three-time All-Star walked four in the first four innings but didn't allow a hit until Chris Owings' leadoff double in the fifth. Six batters, four hits and three runs later, Cain's night was over.
"He was really throwing the ball so well," Giants manager Bruce Bochy said. "He just lost his good command. His pitches were going back over the middle. He lost it there and we had to go get him."
Robbie Ray pitched six scoreless innings and Jake Lamb continued to slug against the Giants by tripling home a run. Jean Segura and Paul Goldschmidt also drove in runs for the Diamondbacks, who won their fourth in five games and have taken 10 of 12 at AT&T Park.
Ray (1-0) retired eight of nine during one stretch and gave up five hits. He matched his career high with eight strikeouts and walked two.
Matt Duffy had two hits for the Giants, who have lost six of seven after winning six of their first eight. He entered the contest hitless in 13 at-bats and 2 for 24 over his previous seven games.
"We had a hard time figuring (Ray) out," Bochy said. "We had a couple decent chances, we just couldn't get a base hit to keep it going. He's got great stuff."
Lamb hit his triple in the fifth inning. He had a tying home run with two outs in the ninth inning and doubled in an insurance run in the 11th in a 9-7 win over San Francisco on Monday night.
The Giants bullpen held Arizona in check, giving up three hits over 4 1/3 scoreless innings, including two innings bySteven Okert in his major league debut. San Francisco relievers combined to strike out six.
RETURN TO START:
Right-hander Chris Heston, who took the loss in Monday night's 11-inning contest, was optioned to Triple-A Sacramento before the game. Heston, a starter for most of his career, began the season in the bullpen. "We're going to start him every fifth game and get him back on track," Bochy said. "He'll be back up here."
Giants: RHP George Kontos was placed on the 15-day DL with a strained flexor tendon in his pitching arm, retroactive to April 18 and Heston was optioned To Triple-A Sacramento. ... Okert was recalled from Triple-A Sacramento along with RHP Mike Broadway.
Diamondbacks: RHP Zack Greinke (0-2, 6.75) starts on Wednesday night. He's the only pitcher to start against the Giants at least 10 times and remain undefeated - he's 7-0.
Giants: LHP Madison Bumgarner (1-1, 4.50) gets the start Wednesday night. The three-time All-Star is 8-6 with a 2.54 ERA in 23 games against the Diamondbacks.