Weekend series could decide NL West

San Francisco is one win away from its first playoff appearance and division title since 2003.

San Diego's road to the postseason is much tougher.

The Giants have a chance to clinch the NL West and possibly eliminate the Padres from playoff contention in the opener of a three-game series Friday night at AT&T Park.

On Aug. 25, San Diego (88-71) had a 6 1/2-game lead over San Francisco in the West. However, since then the Padres have lost 22 of 34 and the Giants have won 20 of 29 to take a three-game lead heading into the final weekend.

San Francisco (91-68) clinched at least a tie for the division crown after beating Arizona 4-1 on Thursday for its fourth consecutive win while San Diego lost 1-0 at home to Chicago for its fourth loss in five games.

Two games behind Atlanta in the wild card race, the Padres need to sweep this set to keep their division title - and likely their postseason - hopes alive.

"We've got to find a way to be very good for three days," San Diego All-Star Adrian Gonzalez said. "That's all it takes."

Though San Diego is 10-5 versus San Francisco - including 5-1 at AT&T Park - this season, the Giants have won five of the last eight meetings. San Francisco outscored the Padres 14-5 while winning three of four at Petco Park from Sept. 9-12.

"We've got to go out there and go hard,'' Giants manager Bruce Bochy said. "We put ourselves in good position but we've got games ahead of us.''

Bochy will move up Matt Cain (13-10, 2.95 ERA) to start the opener and pitch on normal rest.

Looking to equal a career high for wins, Cain is 4-0 with a 2.45 ERA in his last seven starts. Included in that stretch was an outing at San Diego on Sept. 9, where he allowed three runs in eight innings of a 7-3 win to improve to 1-2 with a 4.05 ERA in four starts against the Padres this year.

The right-hander had his 20-inning scoreless streak and no-hitter end in the eighth inning of a 4-2 win at Colorado on Sunday. Cain allowed three hits during his fourth complete game of the season.

"It shows you how strong he is, not just physically," Bochy said.

Cain will be opposed by Clayton Richard (13-9, 3.71) for the fourth time this season. The left-hander, who earned wins in two of those meetings, is 3-1 with a 1.95 ERA in five starts versus San Francisco in 2010.

Richard, however, is 1-4 with a 4.42 ERA in his last six overall. He gave up six runs and walked four in five innings of a 12-2 loss to Cincinnati on Sunday.

San Diego has totaled seven runs and been shut out twice in its last five games.

"We just can't get anything going as a group,'' said manager Bud Black, whose club has averaged 2.79 runs the last 34 games.

Mired in a 2-for-26 slump, Gonzalez is 0 for 13 in his last four games. He is a lifetime .296 hitter with three home runs against Cain.

Rookie Buster Posey, who hit his 17th homer Thursday for the Giants, is 10 for 26 with three home runs against San Diego this year.

Pablo Sandoval and Andres Torres also went deep for San Francisco, which has totaled 16 homers over the last seven games.