PHOENIX -- Losing a heartbreaker to the Padres on Thursday, the D-backs fell further behind in the National League Wild Card hunt with 13 games remaining in the regular season.

Trailing by a run in the bottom of the ninth inning, the D-backs worked the bases loaded with nobody out but failed to score the tying run, resulting in a 6-5 loss.

While the D-backs couldn't complete their sweep on Thursday, the Cardinals got the job done against the Astros in St. Louis, taking their third straight versus Houston, 5-4.

After Thursday's action, Arizona trails the Cardinals by 5 1/2 games for the second NL Wild Card spot.

If the D-backs hope to make their second straight postseason appearance, they will have to leapfrog the Cardinals, Dodgers, Brewers, Phillies and Pirates.

With the loss, the D-backs (74-75) moved back under .500 after reaching the even mark with a win on Wednesday.

The club will begin a four-game series in Colorado on Friday with NL Rookie of the Year candidate Wade Miley taking the mound.

Wednesday's key games to watch (all times MST)

Cardinals (Carpenter, 0-0) at Cubs (Volstad, 3-10), 11:20 a.m. Preview >

Braves (Hanson, 12-8) at Phillies (Kendrick, 9-11), 4:05 p.m. Preview >

Brewers (Marcum, 5-4) at Nationals (Jackson, 9-10), 4:05 p.m. Preview >

Dodgers (TBA) at Reds (Arroyo, 12-8), 4:10 p.m. Preview >

Pirates (Locke, 0-1) at Astros (Gonzalez, 2-1), 5:05 p.m. Preview >

D-backs (Miley, 15-10) at Rockies (Pomeranz, 1-9), 5:10 p.m. Preview >

If the postseason started today ...

AMERICAN LEAGUE
Wild Card: Second Wild Card at First Wild Card
Division Series: Second-best AL record vs. Third-best AL record | Best AL record at Wild Card winner

NATIONAL LEAGUE
Wild Card: Second Wild Card at First Wild Card
Division Series: Second-best NL record vs. Third-best NL record | Best NL record at Wild Card winner

Postseason Bracket »

Postseason 101

Magic numbers
To calculate a team's magic number, take the number of games it has remaining and add one. Then subtract the difference in the number of losses between that team and its closest pursuer.

Tiebreaker scenarios
A tiebreaker game will be played to determine a division winner, even if the tied clubs are assured of participating in the postseason. If a division championship tiebreaker is necessary, the head- to-head record between the clubs will determine home-field advantage. If the head-to-head record is tied, then the division record will be the next tiebreaker.

If two clubs are tied for the two Wild Card berths, home-field advantage will be determined by the head-to-head record between the clubs. If the head-to-head record is tied, then the division record will be the next tiebreaker.

Tiebreaker rules »

2012 postseason schedule
Wild Card playoff games: Oct. 5
Division Series: Oct. 6-12
AL Championship Series: Oct. 13-21
NL Championship Series: Oct. 14-22
World Series: Oct. 24-Nov. 1