The Padres are in the post-season for the second year in a row, thanks to David Wells' first victory since he was traded to San Diego a month ago.
The 43-year-old left-hander, who missed his previous start with gout in his right foot, threw six scoreless innings and Mike Cameron hit a two-run homer to power San Diego past the Arizona Diamondbacks 3-1 on Saturday.
The Padres' win clinched consecutive playoff appearances for the first time in franchise history.
Whether they advance as NL West champions or as the wild card team won't be decided until Sunday's regular-season finales.
The San Diego victory eliminated Philadelphia from post-season contention, while the Padres and Los Angeles remained tied for the NL West lead after the Dodgers won at San Francisco 4-2.
If the two still are even after Sunday's games, the Padres get the division title because they won the season series against Los Angeles.
The playoff berth is San Diego's fifth. The Padres also made it in 1984, 1996, 1998 and 2005.
Trevor Hoffman pitched the ninth for his NL-leading 45th save.
Stephen Drew hit a pinch-hit solo homer off reliever Cla Meredith in the seventh.
Wells (1-2) allowed four hits, struck out three and walked one in his first victory in eight outings, dating to a 6-4 win for Boston over Detroit on Aug. 16. No runner reached second base against him.
Since he was acquired by the Padres from the Red Sox on Aug. 31, Wells was 0-2 in four starts in his return to San Diego. The three-time all-star was 12-8 with a 3.73 ERA for the Padres in 2004, his only full season in the National League.
He was scratched from his scheduled start Monday, but said he felt fine for this one and responded by blanking an opponent for the first time this season.
The Padres didn't get a hit until Russell Branyan's single off Edgar Gonzalez (3-8) to lead off the fifth. Cameron followed with a 455-foot shot far into the left field seats, his 22nd home run of the season, and San Diego led 2-0.
San Diego added a run in the sixth on Josh Bard's RBI line drive off Gonzalez's glove.
Juan Cruz, who has been in the bullpen but hadn't pitched since Sept. 16, started for Arizona and pitched two perfect innings.
Gonzalez relieved Cruz and allowed three runs on three hits in three-plus innings. He struck out two and walked two.
Right fielder Carlos Quentin robbed Dave Roberts of a home run with a catch just above the fence to end the Padres' third.
Notes: San Diego finished September 19-9, matching the most wins in the month in franchise history. ... Wells earned his 230th career victory, sixth among active pitchers. ... Roberts extended his career high with his 49th stolen base. ... Drew's homer was the 31st in ballpark history to land in the swimming pool in right.