AUSTIN, Texas -- What looked like a rout soon turned into another Kansas-Texas classic.
And in the end, the Jayhawks walked away with another hard-fought win over the Longhorns.
Jeff Withey made a layup and free throw with 37 seconds to play and Thomas Robinson added a free throw with 8 seconds left, giving No. 7 Kansas a 69-66 win Saturday after Texas rallied from a big early deficit.
Texas had a last chance to force overtime, but J'Covan Brown's 3-pointer with 2 seconds to play bounced off the rim. Brown led Texas with 24 points.
"To win on the road shows a lot of toughness," said Tyshawn Taylor, who scored 22 points for the Jayhawks in their first game since handing Baylor its first loss of the season. Robinson finished with 17 points and nine rebounds and Withey scored 12.
While the win over Baylor came at home, this one was on the road in a tough environment and required a late rally after the Jayhawks blew a big lead against a Texas team that counts six freshmen in its nine recruited scholarship players.
Kansas coach Bill Self liked how his team pulled it out.
"We needed that," he said. "This is the best win we have had all year. ... I thought we were fortunate."
After the game, Taylor was already looking ahead to the rematch at Kansas on March 3. Last season, Texas beat Kansas in Lawrence to end the Jayhawks' 69-game home winning streak.
"I'm sure it's going to be another dogfight," Taylor said.
So many Kansas-Texas games are.
Kansas (16-3, 6-0) is the only Big 12 team still undefeated in conference play and came in confident against a young Texas lineup. Taylor was sharp early and the Jayhawks quickly built a 15-point lead.
Texas came in desperate for a big win this season and things got chippy in the first half when Robinson and Texas' Alexis Wangmene were whistled for technical fouls after they tangled at midcourt.
The Jayhawks still led by 14 early in the second half before Brown slowly started reeling them in.
Clint Chapman scored 15 and gave Texas its first lead at 59-58 with just over 5 minutes to play. Brown, who scored just four points in the first half, kept firing up shots in the second. His 3-pointer with 3:20 to play put Texas up 64-60.
Brown, who had two 3-pointers reviewed by game officials earlier, turned and shook three fingers in the air after making it. Brown has averaged 26 points in Texas' three straight losses but was just 7-of-26 shooting against Kansas.
Kansas retook the lead on a three-point play by Taylor before Brown made two free throws. Kansas looked to be in trouble when Taylor then missed two from the line and Robinson missed a layup before Withey's three-point play.
Brown had a chance to tie it before he missed with 15 seconds left. Kansas' Travis Releford grabbed the rebound before Robinson's final trip to the line.
Taylor said Kansas was determined to keep Brown from getting a good shot on the last play.
"He still got a good look. That scared me," Taylor said. "He made his best plays late in the game."
Texas has now lost five games by six points or less. The Longhorns had to replace all five starters this season and the youthful lineup has struggled to finish games.
Brown has shouldered much of the burden, often taking over the offense late in games.
"There's no pressure," Brown said. "I want to be a big-time player and big-time players need to make big-time shots."
Mike Krzyzewski says he has good reason to be excited for next season thanks to a combination of Duke's incoming freshmen and a core of experienced upperclassmen.
Georgia guard Juwan Parker has been awarded a medical redshirt, leaving him with two years of eligibility, after missing the 2015-16 season with a partially torn Achilles tendon.
Forward Trevon Bluiett has withdrawn from consideration from the NBA draft and will return to Xavier for his junior season.