ORCHARD PARK, N.Y. (AP) — Josh Allen scored the go-ahead touchdown on a 14-yard run in the fourth quarter, and the Bills beat the Jaguars 24-21 on Sunday in a game marred by a fight that led to the ejections of Jacksonville running back Leonard Fournette and Buffalo defensive end Shaq Lawson.

Fournette scored twice to tie it at 14 in the second quarter. He finished with 95 yards on 18 carries before he was thrown out with 2:57 left in the third.

Allen also threw a 75-yard touchdown pass to Robert Foster in the rookie quarterback's first game since missing four with a sprained throwing elbow. Rookie receiver Isaiah McKenzie scored on a 6-yard run off a sweep, and Buffalo (4-7) came off its bye week off to win consecutive games for the first time this season.

The Jaguars (3-8) dropped their eighth consecutive game in their longest losing streak since a nine-game slide in 2016, which led directly to Gus Bradley being fired and replaced by current coach Doug Marrone.

Jacksonville made a critical mistake on second-and-10 from its own 2 with 5:01 left. Blake Bortles' pass to a wide-open James O'Shaughnessy over the middle went off the tight end's hands and was intercepted by Jordan Poyer.

Stephen Hauschka then hit a 22-yard field goal to put Buffalo up 24-14.

Bortles completed a 13-yard touchdown pass to Dede Westbrook with 1:20 left, but Buffalo's Zay Jones recovered Josh Lambo's onside kick.

Tempers boiled over when Jaguars receiver Donte Moncrief caught what was initially ruled a 30-yard TD pass at the left pylon in the third. He was on the ground battling for control of the ball with Levi Wallace when a Jaguars player struck Poyer from behind, and then Lawson ran in and hit Fournette.

Lawson and Fournette pushed their way to side of the stands and traded punches while Jaguars running back Carlos Hyde and Bills defensive end Jerry Hughes attempted to separate them.

The two were then escorted off their respective sidelines and began yelling at each other as they reached the tunnel. Lawson had to be held back by a Bills official while Fournette was asked to wait — he was then struck in the left shoulder by a fan, who had reached out from the stands.

The game went south for Jacksonville after that.

A review negated the touchdown, ruling Moncrief was down at the 1. Hyde lost a yard on first-and-goal, and then O'Shaughnessy was flagged for a false start.

Westbrook then had a touchdown catch nullified by an offensive holding penalty on fellow receiver Keelan Cole.

After Kyle Williams sacked Bortles for an 8-yard loss, Lambo missed a 42-yard attempt wide left.

The Bills responded with Allen capping a three-play, 68-yard drive on a called run up the middle in which he broke two tackles, including outmuscling linebacker Myles Jack at the 1 to cross the goal line. The Bills were helped by a facemask penalty on Yannick Ngakoue on the first snap, and then Barry Church was flagged 15 yards for hitting a defenseless receiver on Foster's 19-yard catch over the middle.

Allen finished 8 of 19 for 160 yards passing and had a team-best 99 yards rushing.

Bortles went 12 of 23 for 127 yards with a touchdown and two interceptions.

The Jaguars finished with 173 yards rushing in the first half alone. It was their most in the first half since gaining 251 against Indianapolis on Dec. 10, 2006.

TRASH TALKING

Jaguars cornerback Jalen Ramsey raised eyebrows in August when he referred to Allen as "trash" in an interview with GQ magazine. Ramsey was beaten by Allen on a 32-yard reception by Kelvin Benjamin on Buffalo's first touchdown drive. Ramsey was also penalized for a facemask while tackling Benjamin.

Moments after he had an interception negated by an illegal contact penalty, Ramsey was spotted yelling “You trash, you trash!'' toward the Bills sideline. The exchange took place with three seconds left in the first half.

INJURIES

Jaguars: LG Andrew Norwell did not return after hurting his ankle in the fourth quarter. DT Marcell Dareus was inactive due to a back injury.

Bills: CB Lafayette Pitts did not return after sustaining a head injury while covering a punt in the first quarter.

UP NEXT

Jaguars: Host Colts next Sunday, three weeks after a 29-26 loss at Indianapolis.

Bills: Close with four of five against AFC East rivals starting with a visit to Miami next weekend.