Matt Cain found a solution to his lack of run support Saturday night -- just drive some home himself. And for good measure, throw in a little Ty Cobb on the basepaths.

Cain, who had received just four runs of support in his four previous starts, broke open a one-run game with a two-run double in the sixth inning as the Giants ended a nine-game losing streak to the Arizona Diamondbacks with a 5-2 victory.

Cain (2-2) also pitched six innings of three-hit ball and struck out eight as the Giants ended a seven-game skid at Chase Field, including the first four games this year.

As if all that weren't enough, the Giants right-hander took a hard Lyle Overbay comebacker off his left shin on the third out of the fourth inning but opened the top of the fifth with single.

Cain subsequently executed a hard slide into Diamondbacks shortstop Willie Bloomquist to break up a double play on a Gregor Blanco grounder, ultimately leading to the go-ahead run in a 1-1 game.

"That was an old-school performance," manager Bruce Bochy said. "He pitched, he swung the bat, he did it all tonight. He's playing the game the way it's supposed to be played. Pitchers can help themselves, too."