The visiting Wildcats, however, rallied to beat the Cardinal, 60-57, in a Pac-12 Conference contest and it's hard to fathom how Stanford let that lead slip away.
Stanford is one of the more experienced teams in the nation, starting two seniors and three juniors. The Cardinal also brings a pair of seniors off the bench.
Senior Dwight Powell played a remarkable game, as did Huestis, who finished with 13 points and 11 rebounds.
"There is still a big upside for our team," Stanford coach Johnny Dawkins said. "I think we have time to continue to improve. I think we showed that guys can still make another jump. I thought for instance that Stefan Nastic made a jump in this game. He was more active and made plays around the basket."
Powell was in foul trouble much of the game and he's one of Stanford's playmakers. Two seniors who were unavailable — Aaron Bright and Andy Brown — would have made a difference. They are both out for the season.
Huestis made those foul shots with 12:34 remaining to play, giving the Cardinal a 51-44 edge. Stanford (4-4, 13-7) held the Wildcats (8-0, 21-0) to 16 points the rest of the way but only managed six points.
"Our defense won the game," Wildcats coach Sean Miller said. "If you look at the game within the game, our ability to defend at a very high level, to get defensive stop after defensive stop when the other team really needed a score, that was it."
Stanford had a chance to tie the game at the buzzer, but junior Chasson Randle missed a 3-pointer. The Cardinal made only one of its final 13 shots.
Defensively, Stanford held the Wildcats to their lowest point total of the season. The Cardinal scored its second-lowest total of the season.
"Stanford did a great job of keeping us off the glass," Miller said. "They're big and physical. We don't run into that many teams that are as big as we are, and they might actually be bigger."
For everything that went right for Stanford, there was something that went wrong. Arizona, after all, is the top-ranked team in the nation for a reason. The Wildcats have been in this situation before and found a way to win.
The Cardinal has also been in these situations, on the road at Connecticut, on the road at Oregon and on the road at USC, and found a way to win.
Stanford will also find a way to refocus on Arizona State, which visits Maples Pavilion for a 1 p.m. conference game Saturday. The Sun Devils (5-3, 16-5) are coming off an overtime victory over California on Wednesday night.
"It is frustrating but we have Arizona State coming in and we will be ready," Huestis said. "Coming off any loss it is tough to sleep at night. Of course this will weigh heavy on guy's minds. You can go one or two ways with it. You can pick your head up and get ready for the next one or you can let it mess you up. I am sure our guys will be ready to go for the next game."
Arizona fought back from an early seven-point deficit in the first half too. The Cardinal started swiftly, opening a 9-2 lead before the Wildcats made a run of their own.
Stanford, with a great game plan and furious defense, out-rebounded Arizona, 38-32. The Wildcats entered the game with a plus-10 rebounding margin.
Nick Johnson gave Arizona a 55-53 lead with 2:36 remaining and Stanford turned the ball over on its next possession and the Wildcats missed a pair of shots before Huestis grabbed the rebound, which led to Powell's layup with 1:21 left that tied the game at 55.
An offensive rebound for Arizona led to Johnson's 3-pointer with 51 seconds left and a 58-55 edge. Following a 30-second timeout, Randle missed a layup and was forced to foul.
The Wildcats missed their free throw, giving Stanford another chance. Huestis missed a 3-pointer and a foul sent Arizona freshman Aaron Gordon, a product of Mitty High in San Jose, to the line.
Huestis grabbed the missed foul shot, leading to a pair of free throws from Randle that closed the gap to 58-57 with seven seconds left.
Johnson answered with two foul shots of his own, setting up Randle's last-second shot attempt.
"John (Gage) set a really good ball screen and I came up the court," Randle said. "I thought I got a good look at it but it was one of those nights."
Stanford hasn't had much success against the Wildcats over the years, with the Cardinal winning just 34 percent of their meetings. Arizona has won eight straight in the series.
Stanford has not beaten a No. 1 team since December 2003, when it defeated Kansas, 64-58, at the Wooden Classic in Anaheim. The Cardinal's last win over a No. 1 at home came 26 years ago, when it beat an Arizona team featuring Sean Elliott, Tom Tolbert and Steve Kerr 82-74.
The Cardinal lost a chance to move into a third-place tie, instead falling into a sixth-place tie with Colorado.