The Buffalo Bills game on Thursday had all the wrong ingredients for a fan base with a reputation for being one of the rowdiest in the National Football League.

A longtime nemesis, the Miami Dolphins, were in town.

The game was nationally televised. Fans were still a little surly from the loss five days ago.

And, of course, it was a night game, which left Bills fans plenty of time to start drinking well before kickoff.

“I have to say, with night games, all bets are off,” said Capt. Ron Kenyon, with the Erie County Sheriff’s Office.

“You never know what’s going to happen at a night game, when the fans come out of here,” said Kenyon, as he watched them file into the stadium from Big Tree Road Thursday night.

Some fans began trickling out of the stadium with the game in doubt. But most fans remained glued to their seats until a timely interception.

But at the conclusion of a 19-14 triumph, the exodus from the Raph began in ernest, with choruses of the “Shout!” song emanating from fans both dog-tired and jubilant around the midnight hour.

Some remained in the parking lot for a bit of belated partying, awaiting the thinning out of traffic headed into a dark Buffalo-area night and the certainty of a workday only hours away.

It had been four years since the Bills last hosted a night game, and while there is a general thought that those can often be some of the rowdiest crowds of the year, it’s not an exact science, according to those who know: law enforcement officers who make the arrests at the stadium.

A lot depends on who the Bills are playing, said Erie County Sheriff Timothy Howard, whose department handles traffic on Game Day.

Emotions are always running higher against divisional rivals like the Dolphins, Jets and Patriots, he said. Games against Pittsburgh and Oakland, which usually fill Ralph Wilson Stadium, also seem to get the crowd revved up.

“That’s a recipe for trouble,” said Deputy Tim Dusza, who has been working games for 13 years.

The Bills fan base has a long-established reputation around the league for straddling that fine line between passionate and rowdy.

In 2008, the Wall Street Journal pegged Bills fans as “some of the worst-behaved fans in sports.”

And that same year, ranked Bills fans fifth worst among 32 NFL teams in their treatment of opposing fans.

Our reputation hasn’t changed much in four years. Bleacher Report, the sports media network owned by Turner Broadcasting System, also ranked Buffalo fans as the fifth rowdiest in the league, behind Green Bay, Seattle, Pittsburgh and Oakland.

Authorities say they’re seeing more ejections from the stadium for rowdy behavior at the games and arrests seem to be down.

The NFL and the Bills have tried a number of initiatives to curb rowdiness.

Last year, the Bills unveiled a marketing campaign, “Make Mom Proud,” with the simple idea for fans at the game: If you get ready to do or say something stupid or vulgar, just imagine that your mother is watching and listening.

This year, the teams and league unveiled the list of the unforgiven.

The new policy says that fans arrested or ejected from games for rowdy behavior must complete a four-hour online course in alcohol abuse, disruptive behavior and proper conduct before they’re allowed back into that stadium or permitted to buy tickets.

If they don’t complete the $65 course, their names go on the list. If they’re caught inside the stadium, they can be arrested as trespassers.

News Staff Reporter T.J. Pignataro contributed to this report.