Dwight Powell had 14 points and 11 rebounds. His driving dunk with 1:09 to go gave the Cardinal (16-11, 7-7 Pac-12) a 78-69 lead.
Huestis had just four points and one rebound in the first half, after which Oregon State led 35-34. Chasson Randle scored 12 of his 13 points in the first half to keep Stanford in it. The Cardinal led nearly the entire second half.
Andy Brown also scored 13 for Stanford, and Aaron Bright had 12 points and six assists.
Roberto Nelson had 28 points to lead the Beavers (13-14, 3-11), who remain in a tie for 10th with Utah.
Joe Burton had 16 points and eight rebounds for Oregon State, and Eric Moreland had 11 points, 11 rebounds and three blocked shots.