Updated

Even seemingly unhittable pitches thrown by the Colorado Rockies are getting pounded these days.

Pablo Sandoval dug out a ball near his ankles for his first homer in two months, a three-run shot off Tyler Chatwood in the first inning that sent the Rockies to a 7-1 loss to the San Francisco Giants on Wednesday night.

"I threw a good pitch to Pablo and he put a good swing on it and kept it fair," Chatwood said. "Nothing you can really do about that."

Nothing Colorado could really do against Matt Cain, either.

The ace right-hander pitched eight solid innings to earn his career-best 15th win and move the Giants another game closer to clinching the NL West title. After using 17 relievers over the past three games, leave it to San Francisco's "workhorse" to become its first starter since Barry Zito on Aug. 23 to last at least eight innings and give manager Bruce Bochy a break from all those walks to the mound.

"I'll have to get on the treadmill tonight to get my workout," Bochy joked.

Sandoval's shot against Chatwood (4-5) was his ninth homer of the season and helped hand Cain (15-5) another milestone in a season full of them. With the second-place Dodgers splitting a doubleheader in Washington, San Francisco (86-63) also lowered its magic number to clinch the division to five.

Cain allowed four hits, struck out eight and walked four. Chris Nelson scored on D.J. LeMahieu's flyout in the fifth for the only blemish on Cain's latest gem.

"It feels good to finally get past that 14 number," Cain said. "But you know what? We've got games left, and I don't want to stop now."

Gregor Blanco added three singles and two RBIs, and Jose Mijares pitched a perfect ninth to give San Francisco its third straight win and seventh in the last eight games.

Chatwood allowed eight hits and three runs in four innings, extending his winless streak to four straight starts as the Rockies dropped their fifth in a row.

Sandoval reached in front of the plate to dig out an 0-2 slider near his ankles, pulling it off the right-field foul pole to give the Giants a 3-0 lead on what he jokingly called a "back-foot slider." The switch-hitting Sandoval had gone 161 at-bats since his last home run July 8 against Pittsburgh's A.J. Burnett. He was even teased by pitcher Madison Bumgarner — who homered last week in Colorado — and Cain during batting practice.

"He hadn't hit a home run since like three years ago," Cain said, laughing.

"About time," Sandoval said.

Chatwood just shook his head on the mound at what Sandoval did with his pitch.

"I've seen him do it here, I've seen him do it in Denver," Rockies manager Jim Tracy said. "I think the intent was to bounce the breaking ball with two strikes, and he didn't."

In the pitcher-friendly confines of AT&T Park, the home run was just the 24th at home for the Giants this year, which has frustrated hitters but also played into San Francisco's strength.

Cain controlled Colorado's depleted lineup in his typical solid and steady style.

The only hits the hard-throwing righty allowed over the first 15 batters were singles by Nelson. And Cain wiggled out of his only jam when he got Carlos Gonzalez to ground out to second with the bases loaded for the final out of the fifth.

Cain went 14-8 in 2009 and has won at least 12 games in four of his previous eight seasons. Cain, who was the NL starter in the All-Star game, improved to 14-0 this season when the Giants score at least three runs.

Brandon Belt hit an RBI double and Blanco had a two-run single in the fifth to extend San Francisco's lead to 6-1. Blanco also stole his 23rd base after he singled in the fourth.

Buster Posey's bloop single in the sixth drove in another run and fans again showered the All-Star catcher with chants of "M-V-P! M-V-P!" He finished 2 for 4 to give Cain, who also eclipsed 200 innings pitched for the sixth straight season, even more cushion.

NOTES: Cain is 28-5 when he throws at least eight innings. ... Colorado's Jordan Pacheco had the day off because he will start at catcher in the early afternoon game Thursday. ... Jorge De La Rosa will make his first start for the Rockies since Tommy John elbow surgery last year when he faces fellow lefty Barry Zito (12-8, 4.21 ERA) in the series finale Thursday.

___

Follow Antonio Gonzalez at: www.twitter.com/agonzalezAP