Updated

Texas freshman Tristan Thompson had 19 points and 13 rebounds with some spectacular putback dunks, and the seventh-ranked Longhorns pulled out a 60-54 victory Saturday night at Baylor, whose NCAA tournament hopes took another big hit.

The Longhorns (25-6, 13-3 Big 12), coming off consecutive losses for the first time this season, overcame a nine-point deficit in the second half. They go into next week's Big 12 tournament as the No. 2 seed.

LaceDarius Dunn had 22 points for Baylor (18-12, 7-9) to become the Big 12's career scoring leader. Dunn scored 12 points in a 22-6 run over a 7-minute stretch that spanned the closing 3½ minutes of the first half and the start of the second half, putting the Bears up 34-25.

Thompson then had one of his putback dunks and an inside basket to start the Longhorns' comeback, and they finally got even at 38-all when Gary Johnson hit two free throws with 10:47 left.

Johnson had 15 points and Jordan Hamilton 14 for the Longhorns, who matched a school record with their 13th Big 12 victory. They started 11-0 in league play before losing three of four heading into the regular-season finale.

After two free throws by Dunn put Baylor up 45-43 with 6 minutes left, Hamilton tied the game with a short hook. Dunn then missed a 3-pointer and Hamilton made a 3 from the left corner in front of the Texas bench to put the Longhorns ahead to stay.

Dunn entered his final regular-season home game, the only Baylor senior, needing five points to break the Big 12 record of 2,256 points by Andre Emmett of Texas Tech from 2001-04.

Dunn made a basket on Baylor's opening possession, and another with 9½ minutes left in the first half before getting fouled 6 minutes later. Dunn missed his first free throw, but made the second with 3:34 left to break the scoring record and start the Bears' big run.

After the game, Emmett's mother was introduced at midcourt and read a letter of congratulations from her son, who is playing in the Chinese Basketball Association.

Baylor freshman Perry Jones had nine points and 11 rebounds.

The Bears got within one victory of their first NCAA Final Four appearance in 60 years last season, when they set a school record with 28 wins before losing to eventual national champion Duke in an NCAA regional final.

They go into the Big 12 tournament seeded seventh and might need to make it to the championship game — or even win the tournament for the league's automatic bid — to get back into the NCAA field. They have lost five of seven games and have losses to each of the bottom four teams in the conference standings.

Texas led 19-12 on Johnson's three-point play with 3:49 left in the first half.

The Bears got their first lead when Dunn had a rebound and drove the length of the court for a short jumper that made it 21-19. Thompson then had a putback slam to tie the game before Dunn hit a 3-pointer with 6 seconds left for a 24-21 halftime lead.

Both teams got off to a sluggish start — after Dunn scored on Baylor's opening possession and Thompson had a stepback jumper on Texas' first shot.

The Bears missed their next six shots before Quincy Acy's jumper 6 minutes into the game that tied the game 4-all. Texas had missed seven shots in a row at that point, but a dunk by Thompson came right after that and was the first of three consecutive inside baskets by Texas.

When Thompson missed a jumper, Hamilton grabbed the ball in midair and slammed it home. Then Thompson worked inside three defenders for a tough layup.