AP photo by Adrian Kraus / Buffalo Bills quarterback Josh Allen (17) celebrates with wide receiver Stefon Diggs, second from left, as teammates Dion Dawkins, right, and Zack Moss look on during Saturday's home playoff game against the Indianapolis Colts. Allen had just completed a 35-yard touchdown pass to Diggs early in the fourth quarter, but the Bills' 24-10 lead wouldn't last long as the Colts tried to rally.

ORCHARD PARK, N.Y. — Buffalo quarterback Josh Allen and safety Micah Hyde teamed up Saturday to make the franchise's decades of downturn truly history.

Now do you Bill-ieve?

In a season in which the Bills have already busted numerous slumps, Allen became Buffalo's first starter in a quarter century to win a playoff game, and Hyde ensured Buffalo wouldn't endure another second-half collapse — like last year in a wild-card loss to the Houston Texans — or give up a last-second touchdown.

With Buffalo the AFC East champion for the first time since the 1995 season and hosting a playoff game for the first time since the year after that, Allen threw two touchdown passes and scored another on the ground while leading the Bills to a 27-24 win over the Indianapolis Colts in a wild-card game to kick off the NFL playoffs.

Hyde batted down Philip Rivers' desperation pass as time ran out to help Buffalo snap an 0-6 postseason skid by earning its first playoff victory since a 37-22 win over the Miami Dolphins on Dec. 30, 1995.

The past was very much present in Allen's mind when reflecting on how Buffalo squandered a 16-0 third-quarter lead in a 22-19 overtime loss to Houston in his first career playoff appearance.

"Obviously we started off a little slow, and we were able to get into a rhythm late. Made enough plays to win," said Allen, whose team finished the regular season 13-3. "It's new territory for myself, but it just gives us a chance to play next week."

The end of the game, in which the Bills nearly squandered a 24-10 fourth-quarter lead, was so stunning that safety Jordan Poyer was still having difficulty trying to put the result in perspective.

"I haven't had time to celebrate and take it in, but this is awesome for the Bills organization, the city, to be able to play a home game and get a victory," said Poyer, who is in his fourth season in Buffalo. "Since 2017, we've been working at this, but a day like today, to come out on top, we worked so hard."

Hyde's pass defense eased memories of the Bills giving up DeAndre Hopkins' leaping 43-yard touchdown catch in the final seconds of a 32-30 road loss to the Arizona Cardinals on Nov. 15. Buffalo has won seven straight since for its longest winning streak since 1990.

And the win came with a limited number of fans in attendance — 6,700 was the official tally — for the first time during this coronavirus-altered season.

Allen was 26-of-35 passing for 324 yards with a 5-yard touchdown to Dawson Knox and a 35-yarder to Stefon Diggs, which led to the fans chanting "MVP! MVP!" to celebrate the first Buffalo player to lead the NFL in catches and receiving yards in a season.

The Colts ended a season in which they won 11 games for the first time since 2014 and reached the playoffs for the second time in three years under coach Frank Reich, a former Bills quarterback.

Rivers was 27-of-46 for 309 yards and had his career playoff record drop to 5-7 as he finished his first — and potentially last — season with the Colts as he ponders retirement. Losing doesn't get any easier for the 39-year-old quarterback, who has reached the conference title game just once, in 2008.

"Shoot, it's hard to go back 12 years ago to think how I felt in the locker room after that championship game," Rivers said, referring to the San Diego Chargers' 21-12 loss to the New England Patriots. "It's always emotional. But is it more emotional when you're about to be 40 and you're not sure if you've been in your last huddle? Heck yeah."

The game wasn't decided until the final play, when Rivers faced fourth-and-11 from Buffalo's 47. He heaved a deep pass for T.Y. Hilton, who was surrounded by defenders in the right side of the end zone. Hyde broke through the crowd of bodies, leaping up and batting the ball to the ground.

Rookie kicker Tyler Bass accounted for the decisive points by hitting a 54-yard field goal to put Buffalo up 27-16 with 8:08 remaining.

The Colts responded with a seven-play, 75-play drive capped by a 9-yard touchdown pass to Pascal. After Bass stretched Buffalo's lead to 27-16, the Colts scored less than two minutes later. Rivers hit a wide-open Jack Doyle for a 27-yard touchdown, and Doyle caught a 2-point conversion pass.

The Bills, however, didn't make it easy, with Allen nearly losing a fumble at midfield when sacked for a 23-yard loss by Denico Autry on first down from the Indianapolis 37. Offensive lineman Daryl Williams recovered, but the Bills were forced to punt with 2:30 remaining.

"It doesn't matter how it looks," Allen said. "It's the playoffs. It's win or go home, and we got it done."

The Colts were limited to a touchdown and a field goal in the first half after having all five of their offensive series cross midfield and enjoying a nine-plus minute edge in time of possession.

The turning point came when the Colts, up 10-7, were unable to score on four snaps inside Buffalo's 4. Rivers' pass for Michael Pittman glanced off the diving receiver's fingertips on fourth down.

Buffalo responded with a 10-play, 96-yard drive capped by Allen's 5-yard keeper with 14 seconds left in the half.

A Colts miscue also helped extend the drive. Facing fourth-and-3 from the Indianapolis 26, Allen drew defensive end Kemoko Turay offside with a second left on the play clock.

"All around, it felt like we just kept shooting ourselves in the foot," Colts defensive end DeForest Buckner said. "We just let it slip between our fingers."