Oregon State took the lead for good, 40-38, on Cunningham's two free throws 11 seconds after halftime.
A Starks 3-pointer later put the Beavers ahead seven, and Oregon State got the lead to 10 for the first time, 60-50, on two more Cunningham foul shots with 12:23 remaining.
The Beavers went ahead by as many as 16 before Cal scored 12 straight, including two 3-pointers by Allen Crabbe and a four-point play by Gutierrez, to close within 77-73 with five minutes left.
But the Beavers scored the next four and the Golden Bears got no closer than six the rest of the way.
Jordan Men's Cal Golden Bears Heathered Blue/Gold Basketball Performance PoloShop
Mississippi State freshman guard Malik Newman will withdraw from the NBA draft, but sources told ESPN he might explore other opportunities besides returning to Mississippi State.
Seton Hall sophomore Isaiah Whitehead will stay in the NBA draft and not return for his junior season.
Washington State's trio of Josh Hawkinson, Conor Clifford and Ike Iroegbu have withdrawn from the NBA draft and will play their senior season with the Cougars.