MIAMI GARDENS, Fla. >> James Cook caught a touchdown pass and ran for two scores and the Buffalo Bills routed Miami 31-10 on Thursday night, with Dolphins quarterback Tua Tagovailoa leaving early because of a concussion.

Tagovailoa left in the third quarter after colliding with defensive back Damar Hamlin and hitting the back of his head against the turf. Tagovailoa was quickly ruled out with the concussion, casting doubt on his season after a history of dealing with head injuries.

Josh Allen, playing with a glove on his left non-throwing hand after hurting it in Buffalo’s opener, completed 13 of 19 passes for 139 yards. He’s 12-2 against the Dolphins and the Bills are 14-2 against Miami since coach Sean McDermott’s first year as head coach in 2017.

Cook caught a 17-yard touchdown passs from Allen and scored on runs of 1 and 49 yards in the first half, flipping into the end zone when he gave the Bills a 24-7 lead.

Allen didn’t appear limited by the left hand that he hurt after hurdling safety Budda Baker in Buffalo’s opener against the Cardinals. He had his hand heavily wrapped before returning to finish that game and practiced all week with a glove.

Backup Mitchell Trubisky replaced Allen late in the fourth Thursday with Buffalo up by 21.

Miami’s star receiver Tyreek Hill was held to three catches for 24 yards during a week in which he dominated national headlines. Hill was pulled from his sports car by Miami-Dade County police officers, pushed face-first onto a street and handcuffed during a traffic stop outside the Dolphins’ home stadium hours before their season opener.