Sam Darnold outdid fellow rookie QB Josh Allen on Sunday to rally the New York Jets past the Buffalo Bills 27-23 at New Era Field.

Darnold, playing his first game in a month, lead the Jets to a pair of fourth quarter touchdowns, including a 7-yard hookup with Robbie Anderson that tied the game a 20. Later in the fourth, his 37-yard connection with Anderson helped setup the game winning score, a one-yard Elijah McGuire rush on fourth and goal.

Allen outpassed Darnold 202-170, but the Bills QB was intercepted twice, once on the team's final possession as they tried to rally. Allen rushed for 101 yards on the game, becoming just the second quarterback since 1951 to rush for 90 or more yards in three consecutive games, ESPN reported.

LeSean McCoy left early with a sore hamstring, and Chris Ivory departed in the third, leaving the Bills with third stringer Marcus Murphy.

McGuire led the Jets' ground game with 60 yards on 17 carries. New York snaps a six-game slid to move to 4-9.

The Bills dip to 4-9 and will host Detroit next week.