DETROIT — Matthew Stafford got on the field for the first time in the preseason and left the game unscathed.

Some teammates and opponents were not as fortunate.

Stafford threw a go-ahead touchdown pass 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.

"It's an interesting feeling, going out there," Stafford said. "You prepare as hard as you can to play and you're hoping nothing too bad happens."

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

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.

Lions coach Matt Patricia and Buffalo coach Sean McDermott both said they didn't have updates on their injured players.

Stafford 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.

"He got a step on his defender and I was able to fit it in there," Stafford said. "Wasn't an easy catch."

Buffalo's Josh Allen was 3 of 6 for 49 yards in the first half and had an interception negated by a penalty. Allen played against starters and carried out the game plan that called for a heavy dose of runs with LeSean McCoy and Frank Gore. 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.

The Bills (3-0) were able to run out the clock on the final possession, leaving the Lions winless in three preseason games.

"We're itching to get out there and play some real football," Allen said.

SOLID SHOWING

Buffalo started McCoy and alternated Gore in the game and each had a 20-plus yard run. Gore had 57 yards on eight carries and looked like he had just a scare in the second quarter. Safety Tracy Walker made contact with Gore's left leg, and the out-of-bounds hit drew a flag and the ire of his teammates and coaches. Gore left the game briefly, but was cleared to return. McCoy finished with 37 yards on six carries.

"We tried to set our minds to establishing the run first," Allen said.

JUST FOR KICKS

Matt Prater closed the first half with a 61-yard kick to pull Detroit within a point. Prater holds the NFL record for the longest field goal, making a 64-yard kick for Denver in 2013.

INJURIES

Bills: Spain going to the sideline may add to the team's woes on the offensive line. Center Mitch Morse missed the game because he has been in the concussion protocol. Ike Boettger replaced Spain in the lineup against the Lions. Levi Wallace left the game briefly in the second quarter after appearing to be injured, but the starting cornerback was able to return.

Lions: Davis' and Ragnow's potentially serious injuries put rookie linebacker Jahlani Tavai, a second-round pick from Hawaii, on the field with starters on defence and guard Graham Glasgow was moved to centre.

"Injuries are part of the game we all have to deal with," Patricia said.

HE SAID IT

Glasgow said it is particularly disappointing when NFL players such as his lineman Ragnow get injured in the preseason.

"It matters, but it doesn't count," Glasgow said.

UP NEXT

Bills: Host Minnesota on Thursday night.

Lions: Play at Cleveland on Thursday night.

___

More AP NFL: https://apnews.com/NFL and https://twitter.com/AP_NFL