All the Denver Broncos needed to do was win or tie. The formula was more complicated for the Kansas City Chiefs.
So guess which team is going to the AFC playoffs as the last wild-card team next weekend?
Kansas City needed a win at home over Jacksonville and losses by Cincinnati, Tennessee and the arch-rival Broncos, who were all playing home games. A long shot at best.
The Chiefs took care of their own business by holding off the visiting Jaguars, 35-30, and the other dominoes fell into place.
Kansas City fans and the Chiefs had to sweat out the late game in Denver, which ended on a 36-yard field goal by San Francisco's Joe Nedney with 1:52 left in overtime.
So, two weeks after the death of team owner and founder Lamar Hunt, Kansas City is back in the playoffs for the first time since 2003.
Only five of the 12 teams that made the postseason in 2005 are back. Missing are the Super Bowl champion Steelers, Cincinnati, Jacksonville and Denver in the AFC and Carolina, Washington and Tampa Bay in the NFC.
San Diego wrapped up home-field advantage throughout the AFC playoffs and Baltimore clinched a first-round bye in the AFC.
In the day's biggest upset, Detroit won at Dallas, 39-31, to hand Philadelphia the NFC East title. The Detroit victory assured the Oakland Raiders (2-14) of the NFL's worst record and the No. 1 pick in the NFL draft next April.
> Top Dog
49ers 26, Broncos 23
Closing line: Broncos (-10 1/2 )
The scoop: Denver blew an early 13-0 lead and couldn't score in three trips inside the Niners' 5. It was the Broncos' fifth loss in the last seven games and fourth at home this season. . . . Broncos quarterback Jay Cutler left the game when he was knocked woozy in the first half but returned. . . . Champ Bailey of Denver and Walt Harris of the Niners each returned an interception for a touchdown.
Play of the game: Nedney's game-winner, which sent the Broncos packing.
> In the playoffs
Chiefs 35, Jaguars 30
Closing line: Chiefs (-2 1/2 )
The scoop: A roughing-the-passer penalty against the Jaguars' Paul Spicer seemed to ignite the Chiefs, who were trailing, 10-7, midway through the second quarter. . . . The Jags were trailing, 28-10, when third-string quarterback Quinn Gray entered the game and led three TD drives. Jacksonville lost its last three games. . . . Larry Johnson carried 33 times for 138 yards for Kansas City, giving him an NFL record 416 carries for the season. His 1,789 yards rushing broke the team record of 1,750 he set last year.
Play of the game: Green's 35-yard TD pass to Eddie Kennison on the flea-flicker play to give KC a 21-10 lead in the third quarter.
Next: The Chiefs play at Indianapolis on Saturday in the first round of the AFC playoffs.
Eagles 24, Falcons 17
Closing line: Eagles (-8 1/2 )
The scoop: Assured of the NFC East title by Dallas' loss, the Eagles played quarterback Jeff Garcia for only one series and rested other starters. . . . Backup quarterback A.J. Feeley threw for a career-best 321 yards and three touchdowns to help the Eagles to their fifth straight win. . . . Atlanta closed with three straight losses.
Next: Eagles will be home to the Giants next Sunday in an NFC first-round playoff game.
Seahawks 23, Buccaneers 7
Closing line: Bucs (-3)
The scoop: Seattle ended a three-game losing streak, scoring on its first two possessions and never trailing. Already hit hard by injuries all season, the Seahawks lost another player -- cornerback Kelly Herndon with a broken left ankle.
Next: Seattle will be home to Dallas at 8 p.m. on Saturday in the first round of the NFC playoffs.
Panthers 31, Saints 21
Closing line: Panthers (-3)
The scoop: The Saints were three-point underdogs at home because word was out that they would hold out some of their regulars. Quarterback Drew Brees played just one series and running back Deuce McAllister had the day off.
Play of the game: Chris Gamble's 18-yard interception return put Carolina in front to stay, 21-14.
Quote: "For these fans and these people, their spirit has been with us the entire time." -- Brees commenting on the New Orleans fans.
Next: The Saints have a first-round bye in the NFC playoffs.
Patriots 40, Titans 23
Closing line: Titans (-3)
The scoop: Quarterback Tom Brady played three quarters as the Patriots held little back in ending the Titans' six-game losing streak. . . . New England made Tennessee quarterback Vince Young look like a rookie. Young was sacked five times, threw two interceptions and no touchdown passes.
Play of the game: Pacman Jones returned a punt 81 yards for the first Tennessee touchdown.
Quote: "I wanted to give it to him. I think he deserves that." -- Belichick on his letting 43-year old Vinny Testaverde play and throw a touchdown for an NFL record 20th season.
Buffalo buzz: Travis Henry ran 21 times for 102 yards, giving him 1,211 for the season.
Next: The Patriots will be home against the Jets in the first round of the AFC playoffs.
Chargers 27, Cardinals 20
Closing line: Chargers (-14)
The scoop: Philip Rivers threw two touchdown passes after suffering a foot injury and LaDainian Tomlinson limped off after wrapping up his first NFL rushing title as the Chargers won their 10th in a row.
Next: The Chargers have a first-round bye in the AFC playoffs.
Colts 27, Dolphins 22
Closing line: Colts (-9)
The scoop: Peyton Manning passed for two touchdowns and ran for another. . . . Miami quarterback Cleo Lemon produced only one touchdown in six trips inside the Colts' 25.
Next: The Colts will be home to the Chiefs on Saturday in the first-round of the AFC playoffs.
> 'Til next year
Steelers 23, Bengals 17
Closing line: Bengals (-6)
The scoop: The Steelers were spoilers in what may have been Bill Cowher's final game as Pittsburgh coach. A win would have put the Bengals in the playoffs. . . . Shayne Graham missed a 39-yard field goal with eight seconds left in regulation. . . . Cincinnati lost its last three games to miss the playoffs after winning the AFC North in 2005, then losing to Pittsburgh in the playoffs.
Play of the game: In overtime, rookie Santonio Holmes traveled 67 yards with a slant pass from Ben Roethlisberger to end the Bengals' season.
Quote: "I know where I'm leaning. I want to make sure I'm thinking clearly about it. I'm not burned out. When I make a decision, it's a well-thought-out one. I'm not a hindsight kind of guy." -- the Steelers' Cowher on whether he plans to resign.
Rams 41, Vikings 21
Closing line: Rams (-2 1/2 )
The scoop: The Vikings' No. 1 rushing defense gave up 168 yards to the Rams. Steve Jackson scored four times for St. Louis, running for three scores and catching a 10-yard TD pass from Marc Bulger. . . . Bulger was not sacked and threw no interceptions. . . . It was the third straight loss for the Vikings.
Play of the game: Ron Bartell started the rout by returning a Tarvaris Jackson pass 38 yards for a touchdown.
> Dog of the day
Texans 14, Browns 6
Closing line: Texans (-4)
The scoop: Rookie Chris Taylor of the Texans ran 5 yards in the third quarter for the only offensive touchdown, giving Houston a 7-3 lead. Taylor, an undrafted free agent from Indiana who began the season on the practice squad, finished with 99 rushing yards.
Play of the game: Anthony Maddox, a 295-pound defensive tackle, stripped the ball from Browns quarterback Charlie Frye, then rumbled 47 yards for a touchdown to make it 14-3 in the third quarter.
Compiled from Associated Press and News wire services