PHOENIX -- The Giants came to Arizona with a five-game losing streak, and by the end of the sixth inning at Chase Field, their manager had been ejected, their third baseman was injured and their ace was again getting shelled.
An hour later, the victory soundtrack was playing in the clubhouse.
Brandon Belt hit a homer and drove in the go-ahead run with an eighth inning single, making up for another rough day for Matt Cain as the Giants downed the Arizona Diamondbacks 6-4 and ended a frustrating skid Monday.
The victory brought a festive mood to a clubhouse that nearly lost Pablo Sandoval to another injury. Sandoval was pulled in the sixth inning with right elbow discomfort, the same injury that nearly put him on the disabled list for opening day. Manager Bruce Bochy said Sandoval felt better after being removed by trainers and was hopeful that Sandoval would need only one day of rest.
The third baseman, who has nine hits in his last 13 at-bats, had a different plan.
"I don't think so!" he said. "You know me -- I want to play. It feels a lot better right now."
Sandoval didn't want to exit after feeling pain, but the training staff insisted he play it safe. The decision was a lot easier to swallow after Belt broke a 4-all tie with a two-out, two-run single in the eighth.
"I'm getting there," Belt said. "I definitely feel more comfortable and confident. This past week has gone pretty well."
That might be true for Belt as an individual, but the Giants were reeling as a team and in need of a shutdown performance from their opening day starter. Staked to a 3-0 lead, Cain couldn't deliver.
Former Giant Cody Ross drew a walk to lead off the fourth inning, and Jason Kubel followed with a home run to right field. Three pitches later, Eric Chavez lined a changeup into the left-field seats. With two outs, Martin Prado hit a solo homer to left.
It was the first time in Cain's career that he gave up three homers in one inning, and they brought his season total to nine. In 2011, Cain allowed just nine homers the entire season.
Cain said he thought he was still making good pitches.
"It is a little weird," he said. "You make some pitches and they're homers. Sometimes it seems like all the hits are homers. Do you understand it? No. That's just the way it is, and you get over it."
Bochy came out to argue after Hunter Pence was incorrectly called out at first on the back end of a double play to end the top of the fifth. Before long, Bochy earned his first ejection of the season and 58th of his career.
"You're in one of those ruts, and it's frustration that has built up," Bochy said. "You still take the losses hard. For a manager, you always try to think of ways to get out of (a losing streak)."
Bochy mixed up the lineup Monday, putting Belt in the No. 8 spot for just the fourth time in his career. Belt's first at-bat produced his second homer of the year. Six innings later, he helped the Giants snap their longest losing streak since July.
Belt said the move down didn't bother him and joked that he would simply try to inch his way back up the lineup to his familiar No. 6 slot.
Affeldt (strained oblique) felt fine after a bullpen session and might return to the active roster Friday.
Giants (Madison Bumgarner 3-0) at Arizona (Trevor Cahill 1-3), 6:40 p.m. CSN Plus