The Bills were charging downfield on offense in the final minutes of their matchup against the Dolphins Sunday, aiming to score the winning points to break a tie and win the game before the end of regulation.

Buffalo did just that, winning 30-27, and a former Bill even helped them get the opportunity for the victory, albeit at a cost.

Bills quarterback Josh Allen and the offense were making their way downfield in the final minutes of the contest after Miami tied the score at 27 when Allen threw a deep pass toward the left sideline targeting rookie receiver Keon Coleman.

While the pass was incomplete, Dolphins safety and former Bill Jordan Poyer, who returned to Orchard Park for the first time since his seven-year run with Buffalo ended, was whistled for a personal foul as he made helmet-to-helmet contact on the play. The flag kept the drive alive and led to Buffalo winning the game on a 61-yard field goal by kicker Tyler Bass.

Poyer’s helmet crown made contact with Coleman’s facemask, and his helmet also came into contact with the rookie’s right hand during the hit as well, and he appeared to motion toward his arm on his way to the sideline after the play.

Per Syracuse.com, Coleman had a brace on his right wrist and left the game late after the injury.

Poyer said postgame that he believed at the time that the play was clean.

“I’m just playing football. I thought it was a clean play, felt like I put my helmet right into his chest,” he said to the press. “I’m just playing football, it’s tough. … What can you do? I don’t know. I had a great post-break, he went up for the ball and I literally didn’t stop my feet. I felt like I hit him where I was supposed to hit him. Apparently, the ref didn’t think so.”

Dolphins coach Mike McDaniel acknowledged that their goal is to play aggressively, though he did not disagree with the penalty call.

“It takes it out of everyone’s hands when you go helmet to helmet,” McDaniel said. “I didn’t see it live, but if there was helmet-to-helmet contact, it is what it is. You have to go strike zone, which is below the neck. So they’ll call that every time if that’s the case.”

Buffalo was down a receiver as recent trade acquisition Amari Cooper had been ruled out ahead of Sunday’s game with an arm injury of his own.

Coleman has been a top receiver for the Bills this season with 22 catches for 417 total yards and two touchdowns.