WACO, Texas (AP) Mario Kegler didn't get to answer when asked if he wanted the ball with Baylor trailing Texas by one in the final seconds Wednesday.

''Yes,'' teammate Jared Butler chimed in with a nod and smile.

Kegler scored a career-high 24 points, including a pair of free throws with three seconds remaining in overtime, and Baylor rallied from 19 down in the second half to beat Texas 84-83.

''Most teams, to be honest, this time of the year when you're in these situations, you're not going to have the energy to come back and win,'' Baylor coach Scott Drew said. ''It takes a team. and that's why we've been good all year is different people have stepped up. And I think because the team likes one another, they encourage each other, it's easier.''

The Bears (19-9, 10-5 Big 12) won their third straight despite trailing by as many as six in overtime and had a final chance after Jaxson Hayes was called for traveling with seven seconds to go. Texas' long inbound pass was knocked away after Kegler's free throws, and Jase Ferbes' desperation heave was well off the mark as time expired.

''It was tough in the first half, but we came into the locker room and said no matter what we're going to stay together and play with joy,'' Butler said. ''I didn't realize it was that bad, 19. But I kept a faith and kept encouraging, trying to make some plays and not try to win it all at one time. That's what we did with these guys, everyone on the team stepped up. It was a fun game.''

Baylor had 15 offensive rebounds after halftime and outscored Texas 23-7 in second-chance points for the game.

''That's just a heartbreaker. Baylor deserves a lot of credit for the way they battled back,'' Texas coach Shaka Smart said. ''The obvious, biggest factor in the second half - I don't want to say the only factor - was the way they offensive rebounded. And Baylor did a really good job of making us pay, particularly at the 3-point line.''

Devonte Bandoo had 18 points and was 4 for 5 from 3-point range for the Bears, who shot 50 percent (12 for 24) from beyond the arc. Butler and Mark Vital added 15 and 13 points, respectively, for Baylor.

Texas (15-13, 7-8), which dropped its second straight, was 15 for 27 from 3-point range. Ferbes made seven of those shots from distance to lead the Longhorns with 23 points. Courtney Ramey scored 15 of his 17 points in the first half, and he added 10 assists.

Kamaka Hepa and Matt Coleman III had 11 points apiece for Texas, which shot 59 percent in the first half.

BIG PICTURE

Texas seemingly couldn't miss for long stretches of the first half, including during the decisive run. No play illustrated that better than Ramey's off-balance heave at the shot clock buzzer that fell with 11 seconds left and gave Texas a 14-point lead. But the driving lanes to the basket their guards enjoyed in during that time became harder to come by in the second half.

Baylor was seemingly out of it, trailing 62-48 after a Ramey basket with 9:47 to go. But the Bears' win clinches at least a top-six seed at the Big 12 Championship, which guarantees they won't have to play on the first day. Freddie Gillespie came back from a tough game against West Virginia on Saturday with eight points and 11 rebounds to anchor Baylor in the paint.

`THERE'S A CHANCE'

Drew was told after the game Texas' win probability was at 99 percent when it led by 19 points.

''I quickly responded, `So you're telling me we've got a chance.' So, the old `Dumb and Dumber' came through.''

The Bears quickly got back into the game with a 14-0 run that included two 3-pointers apiece from Bandoo and Kegler to give themselves a chance.

BIG SHOT FOR BUTLER

After giving up the big lead in the final minutes of regulation, Texas quickly took control with 3-pointers from Febres and Hepa for an 81-75 lead with 1:45 left.

It took only 15 seconds for Baylor to answer, with Butler cutting the lead in half. That play's importance was easy to overlook with the way the final seconds played out, but it wasn't on Smart.

''I thought (that shot) was as big of a shot as there was in the game. If you keep them from making a 3, it's a two-possession game even if they hit a 2,'' Smart said. ''We've got to be one play better. All I know as a coach is to keep fighting to go grab that one play.''

UP NEXT

Texas will return home to meet Iowa State on Saturday.

Baylor travels to meet No. 16 and Big 12 co-leader Kansas State on Saturday.

---

For more AP college basketball coverage: https://apnews.com/Collegebasketball and http://twitter.com/AP-Top25

Copyright 2019 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.