Matthew Stafford threw a go-ahead touchdown in his first preseason game of the year, and the Buffalo Bills came back to beat the Detroit Lions 24-20 Friday night in a preseason game that became significant because key players on both teams were hurt.

DETROIT, MI – AUGUST 23: Matthew Stafford #9 of the Detroit Lions throws a pass while being pursued by Jordan Phillips #97 of the Buffalo Bills in the second quarter during the preseason game at Ford Field on August 23, 2019, in Detroit, Michigan. (Photo by Rey Del Rio/Getty Images)

READ MORE: Boil-Water Alert Could Last 2 Weeks For Some In SE Michigan

Detroit linebacker Jarrad Davis was carted off the field early in the first quarter with an injured right leg and center Frank Ragnow had to be helped off the field after appearing to hurt his right knee.

DETROIT, MI – AUGUST 17: Jarrad Davis #40 of the Detroit Lions eyes the ball during a first-half play while playing the New York Giants during a pre-season game at Ford Field on August 17, 2017, in Detroit, Michigan. (Photo by Gregory Shamus/Getty Images)

Bills guard Quinton Spain limped off the field with an ankle injury in the first quarter, and cornerback Tre’Davious White left the game with a bruised quadriceps in the second quarter.

Stafford, meanwhile, got on and off the field unscathed.

READ MORE: 133,000 People Remain Under Boil Water Advisory In Michigan, Could Take Weeks Before Water Is Safe To Drink

He was 12 of 19 for 137 yards with an 11-yard touchdown pass to Ty Johnson, perfectly connecting with the rookie running back in the flat while linebacker Matt Milano was covering him closely, to give Detroit a 14-10 lead early in the second quarter.

DETROIT, MI – AUGUST 23: Ty Johnson #38 of the Detroit Lions celebrates a first-half touchdown against the Buffalo Bills during an NFL Pre-season game at Ford Field on August 23, 2019, in Detroit, Michigan. (Photo by Dave Reginek/Getty Images)

Lions kicker Matt Prater made a 61-yard field goal as the second quarter ended to narrow the Bills’ lead to 14-13 at the half.

DETROIT, MI – AUGUST 23: Matt Prater #5 of the Detroit Lions kicks a field goal in the first quarter during the preseason game against the Buffalo Bills at Ford Field on August 23, 2019, in Detroit, Michigan. (Photo by Rey Del Rio/Getty Images)

Buffalo’s Josh Allen was 3 of 6 for 49 yards in the first half, playing against starters. Against reserves, Matt Barkley completed 12 of 14 passes for 142 yards and a 16-yard touchdown pass to Duke Williams late in the third quarter to give Buffalo an 11-point lead.

MORE NEWS: Salvation Army Collecting Supplies For Back To School Drive

© 2019 Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed.