ATLANTA - The Phillies were in flight somewhere between Atlanta and Philadelphia on Sunday when they learned they would be playing the Cincinnati Reds in the National League division series.

Their opponent was not determined until San Francisco reliever Brian Wilson struck out San Diego's Will Venable at 7:11 p.m. in the East, a pitch that prompted an eruption of beer spray in the Braves' clubhouse at Turner Field.

The Giants' 3-0 win in San Francisco, coupled with the Braves' 8-7 win over the Phillies, clinched a wild-card berth for Atlanta and clarified a muddled picture. The Phillies will play the Central Division champion Reds while the Braves play the West Division champion Giants.

Throughout the weekend, the Phillies insisted they didn't care who they would play in the division series. Game 1 against Cincinnati is Wednesday at Citizens Bank Park.

"Honestly, I think our biggest concern is to make sure we're firing on all cylinders going into the postseason, and I think we are right now," reliever Brad Lidge said before Sunday's game. "Yeah, you want to play the team you think gives you the best chance of advancing, but it's hard to say who that would be. So it really doesn't matter a whole lot. We've played well against all the teams that are in it."

Lidge conceded that it would have been to the Phillies' benefit had the other three teams been forced to play Monday and Tuesday in one-game playoffs, which were among the scenarios.

"We wouldn't mind that," he said.

The Phillies, who finished with the best record in the big leagues (97-65) for the first time in club history, did their part to prolong the suspense into the final day of the regular season for their rivals by defeating the Braves in the first two games of the weekend series. The Padres stayed alive by beating the Giants the first two games of their three-game series.

The Phillies certainly made the Braves sweat to make the playoffs for the first time since 2005. They shaved an 8-2 deficit down to 8-7 and had runners on second and third with two out in the eighth when Billy Wagner, a former Phillie, struck out Raul Ibanez. Wagner, who is retiring, then struck out Shane Victorino, Brian Schneider, and Greg Dobbs in succession in the ninth, getting all three on called strikes.

The Braves remained in their clubhouse during the Giants-Padres game, and about 1,000 fans sitting behind the Atlanta dugout watched the game on the giant video screen. When Atlanta's fate was decided, manager Bobby Cox and several Braves came onto the field to celebrate with fans.

A berth in the playoffs was especially satisfying for Cox, who will retire after his 25th season as Braves manager. Cox, whose teams won 14 division titles from 1991 to 2005, was showered with tributes Saturday.

"Now that we're in the playoffs, let's see if we can get to the World Series," Cox said.