GAINESVILLE, Fla. (AP) Noah Locke and his Florida teammates knew what was coming. Alabama had run the same set on its previous two inbound plays.
So the Gators defended it perfectly.
Locke stole John Petty Jr.'s inbound pass and hit a layup with 21 seconds remaining in regulation, helping Florida overcome a 21-point deficit and beat the Crimson Tide 104-98 in double overtime in the Southeastern Conference opener for both teams.
''It was just like we drew it up,'' Locke said.
Florida (9-4) closed it out from the line in the final period, with Scottie Lewis, Andrew Nembhard and Kerry Blackshear Jr. hitting two free throws apiece in the final minute to cap the largest comeback in school history. The previous high was 18, accomplished against Alabama (2007) and South Carolina (1993).
Few saw this outcome coming, at least not after the way the Gators opened the game.
''We looked jittery, unsure, unconfident when we were shooting 2s, shooting 3s, when we were handling the ball,'' coach Mike White said. ''Just out of character.''
Florida couldn't make shots, couldn't defend, had three times as many turnovers as assists and missed its first six shots from 3-point range. The Gators trailed by 21 - their largest deficit of the season - before scoring seven straight points to end the half. Nembhard hit a 3-pointer just before the buzzer to end the long-range drought.
The Gators hit two more treys after the break, huge shots that helped turn the game.
''Stuff that coaches lose sleep over definitely went the wrong way for us,'' first-year Alabama coach Nate Oats said.
Oats pointed to Florida coach Mike White's technical foul with 12 minutes to play in regulation. Oats said 15 of the next 20 calls went Florida's way.
''When you're up 21 on the road to open SEC play, you deserve to get a win,'' Oats said.
But nothing was bigger than Locke's steal. Alabama looked like it would withstand Florida's late run, which came with clutch 3-pointers and a pair of three-point plays from Nembhard.
But the Tide seemed to get lax by running a set play that had worked previously. Florida read it, reacted and responded.
''I've got to give them better options coming out of timeouts,'' Oats said.
White refused to take credit for expecting the play, saying he was ''actually yelling for a timeout there'' before the turnover.
Florida seemed to wear down the Crimson Tide (7-6) in the extra periods, especially after Herbert Jones, Galin Smith and Javian Davis fouled out.
Lewis had a breakout performance with 17 points, 10 rebounds and three blocked shots. Blackshear finished with 24 points and 16 boards despite picking up his fourth foul with 11:36 remaining in regulation.
Nembhard scored 25 points, Locke added 18 and Keyontae Johnson chipped in 10 points and 12 rebounds for Florida.
Petty led Alabama with 19 points. Kira Lewis Jr. finished with 17 points on 7-of-25 shooting. Lewis had a chance to win the game in regulation following Locke's layup, but missed a 3-pointer on the other end.
Jones (15), Beetle Bolden (15), Alex Reese (14) and Jaden Shackelford (11) also scored in double figures for Alabama, which had its three-game winning streak halted.
''We were just about dead in the water a couple different times, mid-first half, mid-second half and just found a way,'' White said. ''Hopefully we can build upon it. It's a good life lesson and a good lesson for the program.''
Alabama: The Tide trailed just once - for less than a minute - until overtime. Despite the loss, Alabama still leads the conference in scoring and 3-point shooting.
Florida: The Gators continued their season of inconsistency even in victory. White revamped his offense following early season losses to Florida State and UConn, giving his players less freedom and more set plays, but Florida looked lost at times in its SEC opener.
Alabama: After opening SEC play on the road for the first time in three years, the Crimson Tide return home to host Mississippi State on Wednesday. Alabama has won five of the last six in the series.
Florida: Travels to play South Carolina on Tuesday. The Gamecocks won last year's meeting on Chris Silva's dunk following a full-court pass from Felipe Haase with 2.5 seconds remaining.
More AP college basketball: https://apnews.com/Collegebasketball and https://twitter.com/AP-Top25