Frank Mason III had a couple of key baskets in the second-half run that put No.9 Kansas ahead to stay.
There were also his two missed throws that gave TCU one last desperate shot to extend the game.
"We're always happy with a win but it was an ugly win in our eyes," Mason said after the Jayhawks' 64-61victory Wednesday night. "We definitely could get better. We did a lot of things wrong."
Mason's layup with 13:26 left got the Big 12-leading Jayhawks (17-3, 6-1 Big 12) to 43-42 and started a 12-0 run that put them ahead to stay. The sophomore guard, who finished with 16 points, also had a long jumper in that spurt.
But a layup by Mason with 3:35 left was their last field goal. He then missed two free throws with 4.7 seconds left to give TCU (14-6, 1-6) a chance to force overtime.
A long 3-point try by Charles Hill Jr. ricocheted off the back rim at the buzzer.
"I've been to the dentist and got a root canal and I may have enjoyed that slightly more than watching the last 2 minutes," coach Bill Self said.
The Jayhawks led 59-48 when Mason made his last jumper. They didn't score again until Brannen Greene made five free throws in the final 37 seconds.
TCU, looking for another memorable victory over the top-10 Jayhawks, pulled to 59-57 on Trey Zeigler's three-point play when he grabbed a rebound of his own miss and made the putback while being fouled.
"The whole game was frustrating. I thought they played harder and obviously they were quicker to balls," Self said. "Yeah, it was a frustrating game and very fortunate that we won because I think that they outplayed us."
After Greene made two free throws with 11 seconds left for a 64-59 lead, Kyan Anderson missed a layup. But Chris Washburn got the rebound and made a dunk before Mason was fouled.
Two years ago, the Horned Frogs got their first-ever Big 12 victory when they lead throughout in a 62-55 winover then-No. 5 Kansas team. That gave the Jayhawks their consecutive losses for the first time in more than seven years.
Anderson had 17 points, while Kenrich Williams had 13 points. Zeigler had 12 points and 11 rebounds while Washburn grabbed 12 boards.
Kansas was ahead by as many as 13 points early, but TCU had the lead after scoring the first seven points in the first 2 minutes after halftime.
Surrounded by defenders to start the second half, Washburn passed over the top to Zeigler for a layup. Anderson then hit a 3-pointer, the Frogs' third shot on that possession. On the next possession, he grabbed the rebound of his missed 3-pointer and was still wide open for a jumper that made it 37-36.
Then there was that late rally.
"That just says a lot about us," Anderson said. "We're not going to stop playing regardless of the situation."
OH SO CLOSE
TCU has either led or trailed by single digits in the final 5 minutes in five of its six losses. The Frogs were coming off their second Big 12 overtime loss, when West Virginia made two free throws with 1 second left right after TCU had gone ahead Saturday. "We don't feel good. There's a frustration level," coach Tent Johnson said. "I hate to use that word, but there's a frustration level because this is the fourth game now where we've had an opportunity to play well and do a few things to maybe win the game. ... We're not into moral victories. So we need to get this thing changed and get it changed in a hurry."
Kansas: Leading scorer Perry Ellis scored the Jayhawks' first five points, but also had two fouls in the first 76 seconds of the game, and didn't play again until the second half. He finished with eight points in 21 minutes, fouling out in the final minute.
TCU: The Horned Frogs, who were 13-0 in non-conference play, have already had two overtime losses in Big 12 play. ... TCU was 15 of 29 (52 percent) on free throws and made only 2 of its 12 shots from 3-point range.
Kansas: is home against Kansas State.
TCU: plays Saturday at No. 15 Iowa State.
Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.