LAWRENCE, Kan. (AP) Game on the line and two seconds on the clock, Kansas kicker Liam Jones prepared for a gifted second-chance opportunity.

''From a mental standpoint, that last kick had to be my first kick of the game,'' Jones said.

Moments before, Douglas Coleman fumbled on a blocked field goal return, and Jones capitalized with a 32-yard field goal to give Kansas a 37-34 win over Texas Tech on Saturday night.

Nick McCann blocked Jones' 40-yard attempt and the ball landed in the hands of Coleman, who ran to his left before attempting a lateral that did not touch another Tech player. Kansas regained possession and Jones sealed their first Big 12 win of the season.

''We played our hearts out,'' Kansas coach Les Miles said. ''Early til late. Down to the wire. Final drive. They won a game.''

Kansas (3-5, 1-4 Big 12) overcome an early three-possession deficit - and the ejection of team captain Bryce Tornedon for targeting.

Trailing 17-0 midway through the second quarter, the Jayhawks rallied heading into halftime, cutting the deficit to 17-14 as Carter Stanley rushed into the end zone to get Kansas on the board and then connected with Stephon Robinson for a 48-yard touchdown the following drive.

The Red Raiders leading 34-27 with 12:11 remaining in the fourth quarter, a 34-yard rush by Velton Gardner tied the game for Kansas. A crucial late stop by the Jayhawk defense set up the winning 52-yard drive.

Stanley fueled the Jayhawk victory with 415 yards passing and four total touchdowns. Stephon Robinson Jr. caught six passes for 186 yards and two touchdowns.

''We really targeted players, guys that we felt could make big plays,'' Miles said. ''We targeted underneath coverage and over the top coverage. Steph Robinson had a grand, just a great game.''

Jett Duffey and Sarododrick Thompson were the main contributors in the Red Raiders' 483 yards of total offense. Duffey connected on 23-of-34 attempts for 271 yards while Thompson rushed for 80 yards for Texas Tech (3-5, 1-4).

THE TAKEAWAY

Texas Tech: The Red Raiders' hopes for bowl eligibility dwindle. In search of at least three wins through its final four matchups, Texas Tech finds West Virginia, TCU, Kansas State and Texas on the docket.

Kansas: The Jayhawk offense produced 527 yards in Brent Dearmon's second matchup as offensive coordinator after 48 points and 569 yards of offense against then-No. 15 Texas. The switch at offensive coordinator appears to be paying off for previously-struggling offense.

A CAREER NIGHT

Averaging 212.1 yards per game entering Saturday night's matchup against the Red Raiders, Stanley's back-to-back 300-plus yard performances mark his most successful outings of the season.

Nearing the end of his senior campaign, Stanley's 415 yards against Texas Tech set a new career high for the veteran quarterback.

EYES CLOSED

Victory reliant on a second-chance field goal, Miles approached Jones prior to the attempt, looking to calm his kicker's nerves.

''I went over to him and I said `I'm not going to let you kick unless you smile,' and he said `I'm going to make this one.' He was right, but I didn't see it go through because I had my eyes closed,'' Miles said with a laugh.

Entering the matchup with the Red Raiders, Jones had hit 6 of 10 field-goal attempts on the season. The junior had two attempts blocked on the night before nailing the game-winner.

UP NEXT

Texas Tech: Following a bye week, the Red Raiders will travel to Morgantown, West Virginia, to take on the Mountaineers on Nov 9.

Kansas: The Jayhawks will return to David Booth Kansas Memorial Stadium to host Kansas State in the 117th Sunflower Showdown next Saturday.

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.