The Buffalo Bills romped over the Dallas Cowboys, 31-10, on Sunday evening and stayed afloat in their race to clinch a playoff spot.

Josh Allen had a touchdown pass and a rushing touchdown in the game but only threw for 94 yards. Running back James Cook carried the bulk of the load on offense as he rushed for 179 yards and ran for a score. Cook also had two catches for 42 yards and a receiving touchdown.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Josh Allen talks to the media

Buffalo Bills quarterback Josh Allen answers questions during a news conference after playing against the Dallas Cowboys, Dec. 17, 2023, in Orchard Park, New York. (AP Photo/Jeffrey T. Barnes)

The star quarterback summed his performance up with a great analogy.

"I don’t think I threw the ball that many times, which again … just get it done," he said, "just find a way to win. I felt like the kid that didn’t do anything in the class project but still got an A."

FROM OUTKICK: BUFFALO BILLS THE NFL’S MOST DANGEROUS TEAM AND NOBODY WANTS ANY PART OF THEM

Josh Allen and James Cook

Buffalo Bills running back James Cook (4) celebrates with quarterback Josh Allen after scoring touchdown against the Dallas Cowboys during the second quarter, Dec. 17, 2023, in Orchard Park, New York. (AP Photo/Adrian Kraus)

Allen and the offense had the Cowboys on their heels the entire game. It started with a Latavius Murray 2-yard touchdown run in the first quarter and then continued with Allen’s touchdown pass to Cook and his own rushing touchdown before the half.

49ERS CLINCH NFC WEST TITLE AFTER BIG DAY FROM CHRISTIAN MCCAFFREY

Dallas only scored one more time after that on a 3-yard run from CeeDee Lamb.

Dak Prescott may have seen his MVP chances slip away as he was 21 of 34 with 134 passing yards and an interception. He was sacked three times.

Josh Allen and the team

Buffalo Bills quarterback Josh Allen (17) celebrates with teammates after scoring a touchdown against the Dallas Cowboys during the second quarter, Dec. 17, 2023, in Orchard Park, New York. (AP Photo/Jeffrey T. Barnes)

CLICK HERE TO GET THE FOX NEWS APP

Buffalo moved to 8-6 overall and 6-2 on the road. Dallas is 10-4 overall and 3-4 away from AT&T Stadium.

Follow Fox News Digital’s sports coverage on X and subscribe to the Fox News Sports Huddle newsletter.