Utah State, which won its 12th game in a row, had all five starting players score in double figures on Saturday night.
Medlin's 22 points topped the Aggies (13-1, 4-0 Western Athletic). Kyisean Reed scored 17 points, Marcel Davis 14, Jarred Shaw 12 and Spencer Butterfield 11.
“We ran the play and didn’t have the look so we just kind of went with what we had," Medlin said about his last-second shot. "I just happened to set a nice little screen on that handoff and got open and hit the shot. I feel like I want the shot and want to see how far I can take it. It was a big shot for us. They were on me hard the whole time and were playing great defense on us. I made it when it counted and that’s when our team really needed it.
Shaw also had 12 rebounds to give Utah a 46-36 advantage on the glass.
Idaho (6-7, 2-1) had four men score in double figures. Connor Hill had 18, Stephen Madison had 14, Kyle Barone had 13 and Mike McChristian had 11.
Barone and McChristian each had 10 rebounds.
Utah State had a 17-6 scoring advantage off turnovers, but Idaho balanced that with a 17-6 scoring edge off the bench.
The score was tied 18 times and the lead changed hands 10 times.
“I’m really proud of our guys first of all," said head coach Stew Morrill. "It would have been so easy for them to just fold the tent. Idaho was scoring at will, we were really struggling to score. They had a very good defensive game plan. The patience on the last play of regulation was amazing. They guarded pretty well. Jarred (Shaw) could have jacked one up, we could have jacked one up a lot of times. We waited until Preston (Medlin) did like he did at Santa Clara and he found a way to make a three. He hadn’t been having a great shooting night, so once we got to overtime, other than free throws, we did what we needed to do to win the game."
Utah State will try to make it 13 wins in a row Friday night at home against San Jose State.