(AP) Nik Shimonek came off the bench in the fourth quarter to throw two touchdown passes and Texas Tech rallied to beat Texas 27-23 Friday night and earn a victory that could save coach Kliff Kingsbury’s job.

Kingsbury’s future has been in doubt after five seasons but the rally made the Red Raiders (6-6, 3-6 Big 12) bowl eligible after missing the postseason last year.

”At times it slips into (your mind) because you think about missing your players. That’s the hardest part. You try to focus on what you can control and that’s get your team ready,” Kingsbury said.

When pressed on his job status, Kingsbury said, ”That’s not a decision for me to make. I want to be here.”

Shimonek, the starter all season, had been benched for McLane Carter, but came in with the Red Raiders trailing 23-13. His first drive included a 51-yard completion and his short touchdown pass to T.J. Vasher cut it to 23-20.

The game winner, a 16-yard pass to Cameron Batson, came with 2:07 to play. The touchdown was set up by a 52-yard interception return to the Texas 14 by Justus Parker.

”I told him he was about to run out of time,” Shimonek said. ”And then he put me in.”

Texas’ final drive ended when Longhorns quarterback Sam Ehlinger threw another interception at the Texas Tech 20 with 1 minute to play.

Ehlinger passed for 239 yards and a touchdown but the Texas offense slogged through most of the final three quarters. The Longhorns ran for just 18 yards and had deep drives end in field goals of 19 and 20 yards by Josh Rowland instead of touchdowns.

Texas (6-6, 5-4) had already clinched its first bowl berth since 2014 under first-year coach Tom Herman but must win its postseason game to avoid a fourth consecutive losing season.