MILWAUKEE (AP) -- The shot was long, and it smacked hard off the glass in the final seconds. That's when big Cameron Ridley, standing every bit of 6-foot-9 and 285 pounds, reached down, picked up the ball and put it in as time expired.

Jonathan Holmes missed badly on a long 3-pointer for the Longhorns in the final seconds, but Ridley emerged from the scrum of hands and scored as the buzzer sounded. The call stood after a video replay, handing Texas its first tourney win since 2011.

''I went to the glass as hard as I could, and I tried to get it as hard as I could and it went in,'' Ridley said.

Ridley finished with 17 points and 12 rebounds for the seventh-seeded Longhorns (24-10), who led by 14 with 12 minutes left. Freshman reserve Martez Walker had 16 points and Demarcus Holland scored 14 on 6-for-6 shooting from the field.

''That's something you are going to remember for the rest of your life,'' Holmes said.

Texas will face No. 2 seed Michigan in the third round Saturday. The Wolverines advanced with a 57-40 victory over Wofford.

Jordan Bachynski had 25 points and seven rebounds for No. 10 seed Arizona State (21-12), which was making its first tournament appearance since 2009. Jahii Carson had 19 points and nine assists, and Jermaine Marshall added 17 points and seven rebounds.

''It's a tough one. It's a tough way to end the game and end my career,'' Bachynski said.

Several Sun Devils just laid down in front of their bench after Ridley's final shot, and Bachynski slowly walked off the court with his hands on the back of his head. He was oh so close to blocking the winning layup.

''They just keep playing. They've been a next-play, next-game team all season,'' Arizona State coach Herb Sendek said. ''I can tell you right now it's a very emotional, heartbroken locker room.''

Texas went to the NCAA tournament in each of Barnes' first 14 seasons at the school, making it to the 2003 Final Four. But last season was a flop for the Longhorns, who went 16-18 and lost in the opening round of the College Basketball Invitational.

Barnes lost three starters from that team, but Holmes and Ridley returned, and the Longhorns were determined to turn it around after the disappointing finish. They stumbled a bit heading into the tournament, losing five of eight, but stepped up at the most critical time against the Sun Devils.

Holmes made two free throws to give Texas a 61-47 lead with 12:11 to go, and the Longhorns looked as if they were ready to deliver a knockout punch. The Sun Devils then scored 17 of the next 22 points, trimming the deficit to two on Jonathan Gilling's 3-pointer with 8:15 left.

Texas edges Arizona State 87-85 on buzzer-beater
during the first half of a second-round game in the NCAA college basketball tournament Thursday, Mar …

Arizona State had an 83-82 lead when Holmes grabbed an airball by Javan Felix and scored while being fouled by Gilling. Holmes made the resulting foul shot with 32 seconds to go.

Gilling made two free throws on the other end, setting up the frantic finish. Gilling had four 3-pointers and 15 points for the Sun Devils, who lost their last four games of the season.

''We talked about them being a really good offensive rebounding team,'' he said. ''That's what killed us the last two possessions.''

The battle of at-large teams in the Midwest Region featured a pair of coaches with a long history together. Barnes first met Sendek at a 1978 basketball camp at the University of Pittsburgh, and Barnes had Sendek on his staff for one season when he was in charge at Providence. They also coached against each other for years in the Atlantic Coast Conference.

Their only other meeting in the NCAA tournament occurred in 2006, when Texas beat North Carolina State 75-54 in the round of 32.

It was a breakneck pace at the very start, with Bachynski's jumper for Arizona State tying it at 21 with 12:32 to go. But Texas responded with a 9-0 run, beginning with Walker's two free throws and ending with Walker's 3 from the wing.

Walker added a layup with 31 seconds left to help the Longhorns to a 41-36 halftime lead. He had 10 points at the break, and Isiah Taylor added nine points and five assists.

I hope the Cowboys can find this kind of luck next season!_________________TODAY IS THE OLDEST YOU'VE EVER BEEN, YET THE YOUNGEST YOU'LL EVER BE, SO
> ENJOY THIS DAY WHILE IT LASTS.