Updated

For a team still fighting to prove its NCAA tournament credentials, Baylor came agonizingly close to the kind of win that could prove very valuable.

At this point, the Bears may have to hope that losing close in a conference as tough as the Big 12 will be good enough.

Cameron Ridley had 20 points and 10 rebounds and made a big defensive play with a block in the final minute as No. 24 Texas held on to beat Baylor 74-69 on Wednesday night after the Bears had rallied from 18 points down to pull within one late.

The loss snapped a four-game winning streak and means that Baylor (18-10, 6-9 Big 12), a team ranked as high as No. 7 this season, can finish no better than .500 in the Big 12 with just three games left in the regular season.

"Our back's against the wall and we know we need to win games," Baylor coach Scott Drew said. "The bad thing, it's kind of like you get penalized having the best conference. ... The Big 12 is the toughest I've personally seen top to bottom since I've been at Baylor."

Javan Felix scored 21 points on seven 3-pointers for Texas (21-7, 10-5), and Isaiah Taylor scored 13, including a twisting left-handed layup that put Texas ahead 72-69. Ridley blocked a layup by Kenny Chery before Taylor made two free throws.

Jonathan Holmes scored 14 points for the Longhorns, including eight straight in a key stretch of the second half to help Texas protect its lead late.

Chery scored 27 points and Cory Jefferson scored 14 for Baylor.

Texas got a much-needed win to restore its confidence after losing three of its previous five games, including two blowout losses on the road. A seven-game winning streak early in the Big 12 schedule set the Longhorns on No. 5 Kansas' heels in the Big 12 title chase until the late-season swoon.

"As much progress as we've had this year, we can let it get away from us really quick," Holmes said.

Felix scored 15 points and Ridley had 13 as the Longhorns shot 51 percent in building a 42-27 halftime lead.

Felix has been a streaky 3-point shooter this season and found his stroke early against the Bears with a quick release catch-and-shoot that didn't give the defenders a chance to close on his shot. The Longhorns led 16-13 when Felix's fourth 3-pointer started a 17-3 run that lasted nearly 8 minutes.

Baylor rallied with an 18-7 run to open the second half sparked by a 3-pointer by Chery and two more from Brady Heslip that pulled the Bears within 49-45. Baylor kept firing away over Texas' zone and kept making shots to keep shaving the lead. The Bears made six 3-pointers in the second half.

Baylor cut the Texas lead to 59-56 before Holmes rescued the Longhorns with four consecutive baskets, including an acrobatic reverse layup when he snagged a rebound in midair and had to twist his body backward just to get off the shot.

Holmes' burst put Texas up 67-60 and the Longhorns needed every point of the cushion over the final 4 minutes. Jefferson got the Bears within 70-69 with 1:37 to play before Taylor and Ridley finally sealed it for the Longhorns.

Ridley played the final 3 minutes with four fouls and saw Chery drive the lane when he stepped up for the block.

"The whole game he was attacking the basket, putting his head down and shooting the ball," Ridley said of Chery. "I could tell the way he was driving he was going to shoot."