LAWRENCE, Kan. (AP) One of the few bright spots all season for Kansas has been its ability to force turnovers, doing so at such a high rate that the Jayhawks have the Big 12's best turnover differential.

They produced another one at a crucial juncture against TCU on Saturday.

It gave them their biggest bright spot, too.

Peyton Bender threw two touchdown passes to Pooka Williams, the Kansas defense hopped on a fumble at its own 6-yard line with 58 seconds left and the Jayhawks held on to beat the Horned Frogs 27-26 to end a four-game losing streak and give their embattled coach just his second Big 12 win.

''They certainly were there and could have easily won that game,'' Jayhawks coach David Beaty said, ''but our guys persevered and I'm extremely proud of them. Guys deserve to have some success.''

The Jayhawks (3-5, 1-4) took the lead on Williams' touchdown grab with 6:13 to go, but TCU (3-5, 1-4) and first-time starter Michael Collins breezed downfield in an attempt to answer it.

Collins converted a third-down pass to give the Horned Frogs first-and-goal at the 9-yard line, and Darius Anderson got the ensuing carry. But the ball popped out when he hit his own lineman and the Jayhawks clearly recovered, even though the officials initially called Anderson down.

The replay gave Kansas the ball. And after Bender took a safety to drain all but one second from the clock, the Jayhawks covered the ensuing squib kick to seal the win.

''Listen, gentlemen, we've been here before. I said before the season, we were young,'' TCU coach Gary Patterson said. ''But the bottom line is, we're going to keep fighting. We're going to keep getting better so we can move forward. ... If we do that, then we'll have a chance.''

Bender finished with 249 yards passing and Williams had 102 yards receiving in giving the Jayhawks just their second Big 12 victory under embattled coach David Beaty. It also was the first against the Horned Frogs since 1997, long before the schools became Big 12 rivals.

''It's awesome for everybody, all the stuff we've gone through, all the stuff that's been said, all the naysayers,'' Jayhawks linebacker Joe Dineen Jr. said. ''It's nice to get a win.''

Collins had 351 yards passing with a touchdown and an interception, and Jalen Reagor had eight catches for 177 yards, as TCU lost its third straight and fifth in six games.

Perhaps it shouldn't have been surprising that the Horned Frogs and Jayhawks played a back-and-forth game that went down to the wire. Even though TCU had won all six conference meetings, five had been decided by two touchdowns or fewer.

Kansas struck first by marching 75 yards for a touchdown, but the Horned Frogs' defense stiffened the rest of the half, allowing just 14 yards the rest of the way.

The TCU offense struggled to capitalize, though, and it took a long touchdown pass to Reagor just before halftime to give the Horned Frogs a 10-7 lead at the break.

Both offenses finally found a rhythm in the second half.

Williams caught his first touchdown pass to give Kansas the lead, then Collins scored his first TD to give the Horned Frogs the lead back. Gabriel Rui added a pair of field goals for the Jayhawks, and TCU answered with a 75-yard drive that Collins capped with another short scoring run.

Kansas pulled ahead once more on its ensuing drive, when Bender converted a pair of third downs and then found Williams in the flat. He made a devastating cutback and went 28 yards for a score, which was upheld after it appeared that the freshman running back fumbled right at the goal line.

Another replay went the Jayhawks' way at the other end of the field a few minutes later.

''Just a mistake I made,'' Anderson said of his fumble. ''Can't get it back now.''

LAST PLAY

The Jayhawks had seven seconds to burn on fourth down at the end of the game, so Bender ran into his own end zone and chucked the ball out of bounds. But it hit a tarp before hitting the ground for a safety, and that left a single second on the clock - and forced a tense squib kick. ''It was definitely a long second,'' Bender said. ''I wish I would have taken another one.''

THE TAKEAWAYS

TCU capped a miserable week in which top playmaker KaVontae Turpin was kicked off the team and quarterback Shawn Robinson was forced to undergo season-ending shoulder surgery with an on-field dud. Collins had a few positive moments, but the Horned Frogs' defense struggled throughout.

Kansas may have a new coach next season - it already has a new athletic director - but its guys are still playing hard for Beaty, who is immensely popular in the locker room. Beaty called the plays for the second game after firing offensive coordinator Doug Meacham and the Jayhawks responded.

UP NEXT

TCU returns home to play Kansas State next Saturday.

Kansas gets a visit from Iowa State next Saturday.

---

More AP college football: https://apnews.com/tag/Collegefootball and https://twitter.com/AP-Top25

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.