FORT COLLINS, Colo. (AP) — K.J. Carta-Samuels passed for 311 yards and engineered an 11-play drive in the final two minutes that ended when Wyatt Bryan kicked a 26-yard field goal as time expired on Saturday and Colorado State edged New Mexico 20-18.

Bryan had missed a chip-shot field goal a few minutes earlier, but the Colorado State (3-4, 2-1 Mountain West) defense forced a four-and-out, setting up the game-winning final drive.

Bryan's winning kick was his 51st field goal, tying the CSU school record set by Jeff Babcock (2002-04). Bryan is the school's all-time leading scorer with 319 points.

Izzy Matthews carried 26 times for 92 yards for CSU, which outgained New Mexico 423-299 in total yards.

New Mexico (3-3, 1-1) took an 18-17 lead when Delane Hart-Johnson leapt for a touchdown pass from Sheriron Jones early in the fourth quarter. The three-play, 12-yard drive was set up by Marcus Hayes' 53-yard punt return.