Sunday afternoon’s Week 15 showdown against the Buffalo Bills at Gillette Stadium could have been a hat and T-shirt game for the New England Patriots.

But unfortunately for the home team, no hats or T-shirts were given out postgame.

Despite leading 21-0 in the first quarter, 24-7 at halftime and 31-28 in the fourth quarter, the Patriots lost 35-31 to the Bills on Sunday. Josh Allen and the Bills offense scored a touchdown on five consecutive drives at one point, and they outscored the Patriots 28-7 in the second half.

The Patriots still have the inside track toward winning the division crown, but the margin for error over the Bills has tightened.

With the exception of the Patriots, each team that entered Week 15 in an AFC playoff spot and played Sunday won its game. The Steelers host the Dolphins on Monday Night Football.

The Kansas City Chiefs lost 16-13 at home to the Chargers, and that result knocked the three-time defending AFC champs out of the playoff race. The last time KC missed the playoffs was 2014. Making matters worse for the Chiefs, quarterback Patrick Mahomes left the game in the fourth quarter with what later was revealed to be a torn ACL.

How does this loss impact the Patriots in the AFC playoff picture? Check out our full breakdown below:

Current AFC Standings

The Broncos gained sole possession of the No. 1 spot in the AFC standings after their win over the Packers and the Patriots’ loss to the Bills. The Jaguars also won on Sunday, setting up for an intriguing Week 16 showdown between them and Denver.

Denver Broncos (12-2, AFC West leader)

New England Patriots (11-3, AFC East leader)

Jacksonville Jaguars (10-4, AFC South leader)

Pittsburgh Steelers (7-6, AFC North leader)

Los Angeles Chargers (10-4. First wild card)

Buffalo Bills (10-4, Second wild card)

Houston Texans (9-5, Third wild card)

Indianapolis Colts (8-6)

Baltimore Ravens (7-7)

Miami Dolphins (6-7)

Race for the No. 1 seed

The Broncos’ win and the Patriots’ loss significantly boosted Denver’s odds of earning the top seed and the only playoff bye. Denver also has the edge in the first tiebreaker, which is win percentage against common opponents. New England’s Week 1 defeat to the Raiders is the reason Denver holds this tiebreaker.

Here’s a look at the remaining schedules for New England and Denver:

Patriots: at Ravens, at Jets, vs. Dolphins

Broncos: vs. Jaguars, at Chiefs, vs. Chargers

The Broncos have the tougher remaining schedule. They still have to play the Jaguars, who are fighting for the AFC South title and have won five straight games. The game against the Chiefs could be an easy one with Mahomes out. And then the finale versus the Chargers could be important for both teams if the AFC West title is at stake.

The Patriots have two games left against teams fighting for a wild card spot. The Baltimore Ravens could also still win the AFC North, and the Dolphins are surprisingly in the playoff mix after a 1-6 start to the season.

It’s also possible the Dolphins could have nothing to play for in Week 18. They pretty much need to win out to have a real chance at securing a playoff berth.

Race for AFC East

After failing to claim the division title on Sunday, the Patriots still control their own destiny in the AFC East race. If the Patriots win out, they will be division champions.

If the Patriots and Bills finish the season with the same record, the first tiebreaker is head-to-head. But since they split the season series, the next tiebreaker is record in division games. The Patriots currently have the edge there with a 3-1 record in the division, while the Bills are 3-2. New England has two more division opponents left on its schedule, while Buffalo has one.

The third tiebreaker is win-lost-tied percentage in common games and the fourth tiebreaker is best win-loss-tied percentage in conference games.

Patriots: at Ravens, at Jets, vs. Dolphins

Bills: at Browns, vs. Eagles, vs. Jets

Current playoff matchups

If the season ended today, here’s what the AFC Wild Card round would look like:

No. 1 Broncos: BYE

No. 2 Patriots vs. No. 7 Texans

No. 3 Jaguars vs. No. 6 Bills

No. 4 Steelers vs. No. 5 Chargers