DENVER — Ja’Quan McMillian intercepted Josh Allen’s deep throw in overtime, and Bo Nix led the Broncos into position for Wil Lutz’s 24-yard field goal that sent Denver to the AFC Championship game with a 33-30 win over the Buffalo Bills on Saturday. The downside: Nix will have season-ending surgery for broken right ankle suffered late in the game.

McMillian’s pick was Denver’s fifth takeaway of the game. He wrested the ball away from Brandin Cooks at the Broncos 20-yard line when a field goal would have won the game for Buffalo.

The Broncos (15-3) will face either New England or Houston for the AFC title next Sunday at Empower Field at Mile High, where Denver has won 14 of its last 15 games.

“We played a really good football team,” Nix said. “They played really well tonight. They gave us a great shot on a short week after a tough game last week, so hat’s off to them. We found a way to win again and our defense made stops and I’m just proud of our guys. I’m just proud of this organization. I’m proud of the way we compete, we fight.

“We’re just never out of it and I think that’s just the character piece. It wasn’t always pretty, we had a good lead and they came back and it wasn’t looking good, but the fourth quarter and overtime, we just found a way to win.”

Broncos coach Sean Payton lamented Denver’s sputtering offense and 1-for-4 performance in the red zone: “We weren’t good in the red zone. But we were good enough when it mattered.”

The Bills (13-6) were flagged for pass interference twice on Denver’s final drive.

Former Broncos kicker Matt Prater nailed a 50-yard field goal with 5 seconds left in regulation, knotting it up at 30-30. That came after Nix’s 26-yard touchdown throw to Marvin Mims Jr. with 55 seconds left had given Denver a 30-27 lead.

Allen, who hadn’t turned the ball over in his previous six playoff appearances, threw two interceptions and lost two fumbles on strip-sacks by Nik Bonitto. P.J. Locke also picked off Allen, ending the QB’s streak of 204 consecutive completions in the postseason.

Two defensive Bills starters were inactive: S Jordan Poyer (hamstring) and LB Terrel Bernard (calf).

Linebacker Dorian Williams (neck) got hurt covering the opening kickoff and was taken via ambulance to a hospital.

Defensive tackle Ed Oliver, who just returned to the active roster, went out late in the third quarter with a knee injury. The seven-year veteran was placed on injured reserve Oct. 28 with a left biceps tear that required surgery. He suffered meniscus damage while rehabbing and had another procedure Dec. 29.

Broncos receiver Pat Bryant suffered a concussion on Denver’s initial drive after he caught three passes for 32 yards.