ORCHARD PARK, N.Y. (AP) Lamar Jackson threw three touchdown passes and the Baltimore Ravens became the AFC's first team to clinch a playoff berth following a 24-17 win over the Buffalo Bills on Sunday.
Baltimore extended its franchise-best winning streak to nine straight and improved to 11-2, its best record through 13 games in team history. With the win, the Ravens can also clinch the AFC North title should the Pittsburgh Steelers lose or tie in their game at Arizona later in the day.
What began as a defensive struggle eventually lived up to its billing in a matchup of two of the NFL's up-and-coming quarterbacks.
Jackson finished 16 of 25 for 145 yards and appeared to blow open the game by putting the Ravens up 24-9 following a 4-yard touchdown pass to Willie Snead with 9:49 left.
Buffalo's Josh Allen responded with a seven-play, 78-yard touchdown drive capped by his 3-yard pass to Cole Beasley, who dived inside the left pylon. The same two then hooked up on a 2-point conversion to make it a one-score game.
The outing wasn't decided until there were 63 seconds remaining. Facing fourth-and-8 at the Baltimore 16, Allen's pass over the middle intended for John Brown was broken up by Marcus Peters at the goal line.
Jackson upped his record to 17-3 since being selected with the final pick of the first round in the 2018 draft. Allen, drafted with the seventh pick overall, dropped to 14-10.
Buffalo (9-4) had a three-game winning streak snapped, and fell short 10 days since garnering national attention following a 26-15 win at Dallas on Thanksgiving Day.
Jackson bounced back from a first half in which the Ravens led 10-6 after being limited to 95 yards, and overcame the loss of starting tight end Mark Andrews who did not return after hurting his knee in the second quarter.
Jackson struck quickly by finding tight end Hayden Hurst for a 61-yard touchdown catch and run three plays into Baltimore's opening drive of the third quarter. Tight end Nick Boyle also scored on a 3-yard touchdown pass from Jackson.
The Ravens' defense dominated in limiting the Bills to just 209 yards while sacking Allen six times.
Lack of discipline, however, was an issue, particularly on Buffalo's final drive.
Buffalo gained 30 yards on personal foul flags called against the Ravens for late hits. Defensive tackle Michael Pierce was flagged first after wrapping up running back Devin Singletary before slamming him to the turf. Two plays later, Linebacker Jaylon Ferguson was flagged to an unnecessary hit on Singletary.
The Ravens also provided Buffalo an extra set of downs when Marlon Humphrey slipped in coverage and fell into the back of Beasley and knocking the receiver down on fourth-and-16.
The game was played in balmy conditions for the second week of December in Buffalo, with temperatures in the mid-40s with winds gusting above 20 mph off nearby Lake Erie. It was much better conditions for the Ravens than last week, when Baltimore overcame rain and winds to eke out a 20-17 victory over San Francisco on Justin Tucker's 49-yard field goal as time expired.
The Bills' defense stymied one of the NFL's most dynamic offenses by limiting the Ravens to 257 yards and forcing a season-high seven punts. Punter Sam Koch entered the day with just 24 punts in Baltimore's first 12 games.
Bills kicker Stephen Hauschka responded by hitting all three of his field-goal attempts, including a 48-yarder, during a week his job security was placed into question. Coach Sean McDermott said the Bills put in a waiver claim for Chase McLaughlin on Wednesday only to have him land in Indianapolis, which was higher in the claim order.
Hauschka was coming off a 26-15 win at Dallas in which he missed a field goal and extra-point attempt.
Former Bills quarterback Doug Flutie, wearing his familiar No. 7 jersey, led a rousing chant of ''Let's go Buffalo,'' just before kickoff. Flutie was on hand as Buffalo's honorary ''Legend of the Game.'' His appearance also coincided with the re-launch of ''Flutie Flakes,'' a breakfast cereal that debuted in 1998, during the quarterback's first season in Buffalo. Proceeds from each sale will go toward the Doug Flutie Jr. Foundation for Autism.
Ravens: Host New York Jets on Thursday night.
Bills: Play at Pittsburgh Steelers on Dec. 15 in Buffalo's first Sunday night appearance in 12 years.
More AP NFL: https://apnews.com/NFL and https://twitter.com/AP-NFL