SAN FRANCISCO (AP) - Jonathan Sanchez pitched the San Francisco Giants back into the playoffs after a six-year absence and also provided a clutch hit, beating the San Diego Padres 3-0 Sunday to win the NL West title.
Buster Posey homered and the Giants beat the Padres after losing the first two games of the weekend series.
San Francisco (92-70), which overcame a 7 1/2-game deficit on July 4, host the wild card-winning Atlanta Braves starting Thursday, with ace Tim Lincecum well rested to go in Game 1. The Braves (91-71) beat the Phillies 8-7, extending manager Bobby Cox's farewell season. Atlanta.
San Diego (90-72) missed a chance to force a Monday tiebreaker for the NL West. The loser of that would have flown to Atlanta to determine the wild card.
The Padres led the division by 6 1/2 games before a 10-game losing streak from Aug. 26 to Sept. 5.
Sanchez (13-9) pitched into the sixth and gave up three hits while walking five. He tripled off Mat Latos (14-10) in the third and scored the first run.
Braves 8, Phillies 7
ATLANTA (AP) _ Tim Hudson and the Braves took a six-run lead, then held on. Atlanta then watched on TV as San Francisco beat San Diego, giving the Braves the NL wild card.
The Braves won 14 straight division titles with Cox but had missed the playoffs since 2005. Cox's final regular-season record was 2,504-2,001. He ranks fourth in wins, trailing only Connie Mack (3,776), John McGraw (2,840) and Tony La Russa (2,638). This is Cox's 15th season with 90 or more wins, second to only McGraw.
Hudson (17-9) allowed four runs and two hits in seven innings against the NL East winners, and Danys Baez (3-4) was the loser. Two-time defending NL champion Philadelphia opens the playoffs at home Wednesday against Cincinnati.
Reds 3, Brewers 2
CINCINNATI (AP) _ Milwaukee manager Ken Macha was told by team management he won't be back next season.
Jay Bruce hit his fourth homer of Cincinnati's title-clinching week, a solo drive off Randy Wolf (13-12) that broke a 2-all tie in the fourth. As the Reds eased into the playoffs for the first time in 15 years, starter Aaron Harang left in the third because of a blister on his right index finger.
Matt Maloney (2-2) won with three innings in relief.
Dodgers 3, Diamondbacks 1
LOS ANGELES (AP) _ Joe Torre ended his managerial career the way it began 29 years ago _ with a victory.
Matt Kemp homered in his fifth consecutive game, a 3-1 victory over the Diamondbacks.
Torre finished with a 2,326-1,997 regular-season record, going 259-227 in three years with the Dodgers. He turns things over to hitting coach Don Mattingly, who has been promoted to manager for next season.
Ted Lilly (10-12) allowed one run and four hits, struck out nine and walked two to reach 10 victories for the eighth consecutive season. Rodrigo Lopez (7-16) was the loser.
Nationals 2, Mets 1
NEW YORK (AP) _ Little-used Oliver Perez (0-5) hit Adam Kennedy with a pitch before walking three batters in a row in the 14th inning.
The Mets finished their second straight losing campaign (79-83) with what likely was Jerry Manuel's final game as manager.
Joel Peralta (1-0) pitched two innings for the win and Miguel Batista got three outs for his second save as Washington ended a string of 18 straight losses in one-run games on the road.
Marlins 5, Pirates 2
MIAMI (AP) _ Dan Uggla homered and drove in three runs, sending Pittsburgh to its 105th defeat. The Pirates finished their record-extending 18th consecutive losing season at 57-105, worst in the majors. The only time the Pirates had more defeats in baseball's modern era was in 1952, when they went 42-112.
Pittsburgh finished 17-64 away from home, matching the 1963 New York Mets for the worst road record in a 162-game season.
Anibal Sanchez (13-12) allowed one earned run in six innings. Brian Burres (4-5) was the loser.
Astros 4, Cubs 0
HOUSTON (AP) _ Carlos Lee homered and Tommy Manzella drove in two runs. Houston went 59-52 following a 17-34 start.
Nelson Figueroa (7-4) allowed six hits in six inning and struck out a season-high eight. Brandon Lyon worked a perfect ninth to complete the shutout after Fernando Abad and Wilton Lopez combined for two hitless innings.
Ryan Dempster (15-12) allowed three runs and nine hits in six innings. Chicago won eight of 12 series after interim manager Mike Quade took over.
Cardinals 6, Rockies 1
ST. LOUIS (AP) _ Jeff Suppan (3-8) allowed five hits in six scoreless innings and Matt Pagnozzi drove in two runs.
St. Louis won its final five games. After an early September surge brought them within one game of the NL West lead, the Rockies lost eight in a row and 13 of 14. Dexter Fowler broke ended a 30 1-3 inning scoreless streak with an eighth-inning home run.
Esmail Rogers (2-3) was the loser.