SAN FRANCISCO -- If there was any question whether Pablo Sandoval's power stroke on Wednesday was a blip on the screen he proved on Thursday it was no fluke.
Then he did it again.
Sandoval hit home runs from each side of the plate for the first time in his career as the Giants completed a four-game sweep of the Rockies with a 9-2 win. By winning for the eighth time in nine games, San Francisco reduced its magic number to clinching its second division title in three years to four, pending the outcome of the Dodgers game at Washington.
The Rockies, meanwhile, lost for the 14th time in 18 meetings with the Giants this season and capped a seven-game road trip with their sixth straight loss. San Francisco moved a season-high 24 games over .500 and won for the ninth straight time with veteran left-hander Barry Zito starting.
The Giants broke the game open with a two-out, six-run fourth inning.
Hector Sanchez and Xavier Nady led off with singles before a fly out and a sacrifice bunt from Zito. Rockies starter Jorge De La Rosa uncorked a wild pitch to plate Sanchez, and the flood gates opened.
Angel Pagan walked before Colorado third baseman Chris Nelson made a good stop of a Marco Scutaro grounder, but threw wildly to first, allowing the second run of the inning to score and sending De La Rosa to the showers.
De La Rosa, 31, was making his first appearance in a big league uniform since May 24, 2011, a span of 264 games missed since last season. A torn ulnar collateral ligament led to Tommy John surgery and a long recovery that included seven rehab starts in the minors.
Sandoval supplied the big blow when he greeted Rockies reliever Edgmer Escalona with a three-run home run into the right field seats on an 0-2 pitch. Sandoval has 12 homers for the season and three in two games, and he went deep twice in the same game for the fifth time in his career.
The Giants weren't done, however, as Buster Posey deposited his 23rd homer of the season into the left-center field bleachers to cap the rally.
The hosts scored with two outs in the first when Sandoval homered to left for a 1-0 lead.
The Rockies answered in the second inning when Wilin Rosario collected the first of his three straight singles, stole second and scored on Jonathan Herrera's two-out single to left.
Colorado's rookie catcher Rosario, drawing a rare start at first base, misjudged a high pop with two outs in the third off of Sandoval's bat that enabled Pagan to score a tie-breaking run. Pagan had reached with a one-out double down the line in left field that Colorado's Andrew Brown failed to reach.
The visitors briefly tied the game again in the fourth with a single run off of Zito. Brown led off with a double and scored when De La Rosa stroked a two-strike single to center after failing to put down a bunt on the first two pitches.
Zito (13-8) earned the win, allowing two runs and 10 hits in 5 2/3 innings. He walked one and struck out six.
NOTES: Giants manager Bruce Bochy wore a 49ers hat in pregame to poke fun at the NFL's threat to fine 49ers quarterback Alex Smith for wearing a Giants cap. "We're just having a little fun with this," Bochy said. "We want to show our support for the 49ers just like Alex Smith shows his support for us." Rockies left fielder Carlos Gonzalez left Thursday's game in the second inning. He missed two recent games due to hamstring injury. Matt McBride replaced Gonzalez in the No. 3 spot in the order. ... The Giants open a three-game series against visiting San Diego on Friday when Ryan Vogelsong (12-9) is set to oppose Casey Kelly (2-1) for the Padres. ... The Rockies head to Denver to play their final homestand of the season. Drew Pomeranz (1-9) is scheduled to pitch against Arizona's Wade Miley.