MANHATTAN, Kan. (AP) -- Kenton Paulino went 4-for-4 from the free throw line in the final 16 seconds, and No. 7 Texas narrowly avoided its second straight loss with a 65-64 victory over Kansas State on Wednesday night.
LaMarcus Aldridge had 16 points for the Longhorns, who were coming off an 81-60 loss at Oklahoma State on Sunday.
P.J. Tucker had 14 points and 12 rebounds for Texas (23-4, 11-2 Big 12) and Daniel Gibson added 13 points -- but both almost undid their scoring performances by missing free throws in the final minute.
Paulino's free throws capped an 11-point night in which he went 8-for-8 from the line.
Kansas State (14-10, 5-8) lost to Texas at home for the first time in Jim Wooldridge's six seasons as coach.
The Wildcats, who beat then-No. 10 Texas 58-48 in Manhattan on March 6, 2004, almost pulled off another upset despite losing their leading scorer and rebounder to foul trouble for much of the game.
But after David Hoskins score cut Texas' lead to 61-60 with 3:01 to go, Kansas State didn't score again until Hoskins made a free throw with 3.7 seconds left to get within 63-61.
Tucker missed two 1-and-1 opportunities in the final minute, but Brad Buckman rebounded Tucker's second miss with 19 seconds left and passed to Paulino, who was fouled and hit both free throws for a 63-60 lead.
After Hoskins' free throw made it a two-point game, Paulino was fouled on the inbounds play and hit two free throws with 2 seconds left for a 66-61 lead. Mario Taybron hit a 3-pointer at the buzzer for Kansas State.
Cartier Martin, who came in averaging 18.7 points and 7.0 rebounds for the Wildcats, sat down with his third foul less than 41⁄2 minutes into the game and did not return until the second half. He scored five points early in the second half but then picked up his fourth foul with just over 13 minutes to go.
He came back in at the 9-minute mark, but never found his offensive rhythm and fouled out with 41 seconds to go. His five points and one rebound were both season lows.
Lance Harris, held to four points in Saturday's 72-60 victory over Colorado, led the Wildcats with 18 points. Hoskins added 16 points and Taybron, starting for injured point guard Clent Stewart, had 12.
The Wildcats led only once, when Taybron opened the game with a 3-pointer, and trailed by six at halftime. Harris' basket with just over 6 minutes left got Kansas State within 57-56, but the Wildcats never tied it.
The Longhorns hit their first four shots from the field -- including two 3-pointers -- and led 14-4 less than 4 minutes into the game. But Kansas State, which missed eight of its first nine shots, got within 32-30 on Harris' basket with just over 4 minutes left in the half.
Texas answered with a 7-0 run, though, and led 42-36 at halftime. It wasn't a one-possession game again until Harris scored with 10:51 left to get Kansas State within 53-50.
Stewart, who injured his ankle against Colorado, did not play Wednesday night.