By Andrew Both
(Reuters) - The Buffalo Bills ended the longest playoff drought in North American major team sports when they qualified for the National Football League post-season on Sunday.
The Bills were last in the playoffs when Bill Clinton was in his final year in the White House in 1999, but after 17 fruitless seasons they gave themselves a chance with a 22-16 win over the Miami Dolphins on the last day of the regular season.
The victory, however, was not enough for Buffalo, who also needed Cincinnati to beat Baltimore.
They nervously watched on television in the locker room in Miami as Bengals' quarterback Andy Dalton connected on fourth down with a 49-yard touchdown pass to Tyler Boyd to earn a 31-27 win at the death and send Buffalo's players into delirium.
"It's been a long time coming," Buffalo coach Sean McDermott told reporters.
Buffalo were not the only team to seal their playoffs spot on the final day of the season with the Atlanta Falcons and Tennessee Titans also winning their respective games to earn their way into the post-season.
Tennessee beat the Jaguars 15-10 in Nashville, while the Falcons, last year's Super Bowl losers, also snuck in with a 22-10 victory over the Carolina Panthers.
The top two seeds, who earn a first round bye, in the AFC had already been decided, though the New England Patriots had to win on Sunday, which they duly did over the New York Jets, to take the number one spot ahead of the Pittsburgh Steelers.
In the NFC, the Philadelphia Eagles had already locked up top seed, though after a 6-0 loss against Dallas on Sunday they enter the post-season as an underdog with first choice quarterback Carson Wentz out with a knee injury.
The Minnesota Vikings clinched the second NFC seed with victory over the Chicago Bears.
The playoffs will begin with four wildcard games between the teams ranked three to six next Saturday and Sunday.
(This story corrects venue in the seventh para.)
(Reporting by Andrew Both in Cary, North Carolina; Editing by Greg Stutchbury)