John Brown became the first Buffalo receiver to throw a touchdown pass and the Bills went on to beat the Dallas Cowboys 26-15 on Thursday.

Bills quarterback Josh Allen ran for a touchdown and threw a scoring pass to Cole Beasley, who had 110 yards receiving and a touchdown in his first game against his former team. The Bills (9-3) got their first Thanksgiving win since 1975 in their first appearance on the holiday in 25 years.

The Cowboys (6-6) stumbled after scoring a touchdown on their opening drive, giving Philadelphia a chance to rejoin them atop the NFC East after their fourth double-digit loss in the past six Thanksgivings.

A lackluster showing for Dallas’ sixth loss in nine games came four days after owner Jerry Jones blasted the coaching staff following a loss to New England.

Allen was 19 of 24 for 231 yards and a career-best 120.7 passer rating as Bills won their third straight game and solidified their hold on an AFC wild-card spot.

The second-year quarterback found the ball at the bottom of a pile after fumbling a snap on fourth-and-1, quickly reached the ball over the first down spot and then stumbled forward 3 yards to the Dallas 28.

On the next play, Brown took a pitch on a double reverse and lofted the ball to wide-open running back Devin Singletary for Buffalo’s first lead at 13-7 in the second quarter.

BEARS 24, LIONS 20

Mitchell Trubisky threw a 3-yard touchdown pass to David Montgomery with 2:17 left, lifting Chicago past Detroit.

The Bears took the lead on the nine-play, 90-yard drive and sealed the victory on the ensuing possession with Eddie Jackson’s interception.

Rookie quarterback David Blough led Detroit’s last drive to the Chicago 26 in the final minute before losing 13 yards on a sack to leave a desperation pass as the only option and Jackson picked off his heave.

Chicago (6-6) has won three of four games after losing four in a row to stay in the NFC playoff picture. The Lions (3-8-1) have lost five straight for the first time under second-year coach Matt Patricia.

Trubisky finished 29 of 38 with three TDs, matching a season high he also equaled in a win over Detroit earlier this month, for 338 yards and an interception.

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