The Braves’ hopes of advancing to the postseason in veteran manager Bobby Cox’s final season will be on the line against the Phillies on Sunday. Atlanta ace Tim Hudson is scheduled to face Cole Hamels, who is scheduled to pitch only two innings.

Atlanta can earn its first postseason berth since 2005 with a victory and a San Diego loss at San Francisco.

Philadelphia reliever Antonio Bastardo (2-0) took the win for the NL East champions, who have already secured home-field advantage throughout the playoffs.

The game followed a tribute to Cox attended by about 70 former players and coaches — and an Atlanta-record crowd of 54,296.

Atlanta third baseman Brooks Conrad’s throwing error helped the Phillies snap a scoreless tie with four runs in the seventh. It was the second straight day a throwing error by Conrad helped the Phillies take the lead.

Jonny Venters (4-4) took the loss.

In San Francisco, victory by San Diego left two NL playoff races up for grabs heading into the last game of the season.

As well as pulling level with Atlanta in the wild-card race, the Padres also closed within a game of the Giants for the NL West lead.

San Diego closer Heath Bell got San Francisco’s Jose Guillen to ground into a game-ending double play with runners at the corners. Bell held on for his 47th save in 50 chances. He is tied for the major league lead with Giants closer Brian Wilson.

Padres starter Tim Stauffer (6-5) allowed three hits in 6 1-3 innings to take the win.

San Francisco starter Barry Zito (9-14) gave up consecutive bases-loaded walks in the first and was booed off after a season-low three innings.

Giants manager Bruce Bochy was ejected after the sixth for arguing when Buster Posey was called out on strikes.

San Diego is 7-1 this year at San Francisco.

In St. Louis, Colorado’s Ubaldo Jimenez came up short in his bid to reach the 20-win mark despite pitching eight scoreless innings in the Rockies’ loss at St. Louis.

Jimenez exited his third attempt at 20 win, but saw Pedro Feliz score the winning run from second when right fielder Ryan Spilborghs bobbled the ball on Matt Holliday’s single off Franklin Morales (0-4), giving the Cardinals their fourth straight victory.

The Rockies lost for the 12th time in 13 games. Colorado was one game out of first in the NL West before the skid.

Jimenez did set a franchise record with 214 strikeouts for the season, four more than Pedro Astacio in 1999.

Cardinals reliever Jason Motte (4-2) had two strikeouts in a scoreless 11th.

In Cincinnati, the hosts beat Milwaukee to reach 90 wins for the season for the first time in 11 years.

Jay Bruce extended his final-week surge with a two-run shot and a solo homer that was reviewed for possible fan interference.

The Reds, despite resting players to get ready for the playoffs, broke the game open off Todd Coffey (2-4) in the seventh.

Cincinnati’s Logan Ondrusek (5-0) took the win, escaping a threat in the seventh after Milwaukee tied it at 4-4.

The Reds will open the playoffs on the road next week, against either Philadelphia or the NL West champion.

In Houston, Aramis Ramirez hit his first grand slam in more than two years to power Chicago past Houston.

The Cubs weres leading 4-0 before Ramirez’s slam stretched the lead and chased Astros starter J.A. Happ in the fourth.

Happ (6-4) allowed a season-worst eight hits and walked five in three-plus innings.

Marlon Byrd drove in three runs for Chicago, while starter Carlos Zambrano (11-6) pitched 6 1-3 innings for the Cubs, who have won five of six.

In New York, the hosts included seven rookies in their lineup yet still beat Washington.

New York’s David Wright hit a three-run homer off Tyler Clippard (11-8) in the seventh inning.

The Mets used six relievers, with Ryota Igarashi (1-1) taking the win.

In Los Angeles, Chad Billingsley took a shutout into the eighth inning to guide Los Angeles past Arizona.

Billingsley (12-11) struck out nine and held the Diamondbacks hitless until the sixth.

Matt Kemp homered for his fourth straight game as the Dodges edged home under the guidance of utilityman Jamey Carroll, who was entrusted with managing the team by outgoing boss Joe Torre.

Rookie Kenley Jansen struck out three in the ninth for his fourth save.

Arizona’s Joe Saunders (3-7) gave up 10 hits over seven innings.

In Miami, fill-in starter Jorge Sosa and four relievers combined on a shutout, pitching Florida past road-weary Pittsburgh.

The Pirates dropped to 17-63 away from home and must win their season finale Sunday to avoid matching the 1963 New York Mets for the worst road record in a 162-game season.

Pittsburgh has the worst overall mark in the majors at 57-104.

Sosa, typically a reliever, made his second start of the season and went four innings in place of Alex Sanabia, who was scratched with an elbow injury.

Brian Sanches (2-2) worked two innings for the win and closer Clay Hensley got the final strike out with runners on second and third.

Pirates starter Charlie Morton (2-12) allowed only one walk and two runs in six innings, while stiking out nine, yet fell to 0-8 in 11 road starts.