Pat Burrell hit a three-run homer to back Tim Lincecum, and the first-place San Francisco Giants remained two games ahead of San Diego in the NL West with a 3-1 victory over the Arizona Diamondbacks on Wednesday night.
The Padres beat the Chicago Cubs 3-0 at home. San Francisco lowered its magic number to three to clinch the club's first division title and playoff spot since 2003. The Giants and Padres close the season with a three-game series at AT&T Park starting Friday night.
With the Giants trailing 1-0, Burrell connected in the fourth with a drive into the left-field seats off Ian Kennedy (9-10).
Lincecum (16-10) struck out 11 in seven innings, the 26th time in his career he's reached double digits for strikeouts. It was the seventh time this year, which matches Milwaukee's Yovani Gallardo for most in the NL.
Lincecum had his start moved up a day so he could be available for a potential one-game playoff Monday or on short rest Sunday.
The two-time reigning NL Cy Young Award winner won for the fifth time in his last six outings following a career-worst five straight losses.
Stephen Drew hit the second pitch of the game for a home run, the first time in Lincecum's career he has surrendered a home run to start the game. He faced baserunners every inning after that, too, but settled down and found a groove.
Manager Bruce Bochy visited the right-hander on the mound in the seventh after he issued a two-out walk to Kelly Johnson. With Lincecum at 110 pitches, the manager left him in. Lincecum then retired Chris Young on a called third strike and his night was done.
He allowed one run on six hits four walks. Javier Lopez struck out two in the eighth and All-Star closer Brian Wilson saved his second straight game. Wilson earned a five-out save in Tuesday's 4-2 win, then converted his majors-leading 47th save in 52 chances Wednesday.
He had runners at the corners with one out, then struck out Johnson and got Young to ground out.
The Giants are yet to name their starters for the Padres series. It is expected to be some combination of Matt Cain, Jonathan Sanchez and Barry Zito -- but their order hasn't been announced.
Burrell's homer was his 20th of the year and 18th since joining the Giants on a minor league deal May 29, seven of those with San Francisco putting his team ahead.
Struggling Giants slugger Pablo Sandoval earned a third straight start after getting two hits with a double in Tuesday's 4-2 win. He had a fourth-inning single, only his 11th hit in his last 60 at-bats.
Giants second baseman Freddy Sanchez was given another day by Bochy to rest his strained right shoulder. Mike Fontenot started in his place for the second straight game.