Updated

Kansas coach Bill Self felt more than a little fortunate that his No. 8 Jayhawks pulled out a 64-63 win against a very tough Texas Tech team.

Andrew Wiggins' layup with 2 seconds left lifted Kansas to victory on Tuesday night.

"I think sometimes you could say they were a little lucky," he said of the Red Raiders. "They threw some in at the end of the shot clock that maybe weren't the highest percentage shots, and we were a little lucky that the ball just happened to bounce to Wigs there at the end. That's part of it.

"We've been unlucky and we've been lucky before, and they usually balance out over time."

The freshman finished with 19 points, and Joel Embiid matched his career high with 18 to lead the Jayhawks (20-6, 11-2). Kansas reached 20 wins for the 25th consecutive season, and 11 conference victories for the 20th straight year.

Texas Tech's Robert Turner sank two free throws with 16 seconds left to put the Red Raiders up 63-62, but Kansas brought the ball up and got it inside to Wiggins for the win.

Jordan Tolbert scored 16 points and Dejan Kravic added 13 to lead Texas Tech (13-13, 5-8).

The Jayhawks own a two-game lead in the Big 12 after Texas fell 85-76 at Iowa State on Tuesday night.

"It's big, it's big, but it doesn't mean anything unless we win Saturday," Self said of Kansas' home game against the Longhorns. "That's the game that would give us some serious breathing room, although we've got a little bit now, and it was big tonight.

"I wasn't banking on them losing, all I wanted to do was win two games this week, and if we were able to do that then it would be a great week."

The score was tied nine times and the lead changed 13 times.

"I was impressed with Tubby (Smith's) team and how hard they played and how well they defended, how well they rebounded," Self said. "They're going to get better. The guy knows how to win. He's a proven winner. Those kids played hard."

Kansas held an early 10-point lead but Texas Tech started hammering the ball inside to make the game tight.

"There wasn't much to say," Smith said of his team. "They're down, they're despondent because it's a tough loss. They felt like they played well enough to get the win, but you've always have to finish the game the right way."

Tolbert made a bucket as the shot clock expired with 2:51 left to put the Red Raiders up 59-55. But Wayne Seldon, Jr. hit a clutch 3-pointer to pull within 59-58. Turner answered with a basket, and Embiid sank two free throws to make it 61-60 with 1:22 remaining.

On the Red Raiders' next possession, a scrum led to Kansas getting the ball. Embiid dunked it to put the Jayhawks up 62-61.

Turner then made his free throws, and Kansas called a timeout to draw up the play to Wiggins.

Kansas scored 22 points from the free throw line, and Texas Tech netted only nine.

Texas Tech came out after halftime and hit four of its first five shots. Kansas made only one basket in four attempts, allowing the Red Raiders to take their first lead since early in the game, 37-32.

Jordan Tolbert capped Texas Tech's 8-2 run.

But the Red Raiders' effective defense also created foul trouble. With more than 13 minutes remaining, Jaye Crockett, Kravic and Kader Tapsoba each had three fouls.

Texas Tech sent the Jayhawks to the line often in the second half. Five free throws — by Jamari Traylor and Wiggins — on three possessions pulled Kansas within 46-45 with about 11 minutes remaining. But the Jayhawks regained the lead for the first time in 11 minutes, 52-51, on a pair of free throws by Naadir Tharpe with 7:14 remaining.

But with Kravic back in, and after a turnover by Tharpe, the 7-foot senior tied the game at 53 on a layup with 5:34 left.