STANFORD, Calif. -- Marcus Lee insisted his confidence never wavered, even as California stared at a 17-point deficit with 9 1/2 minutes remaining.
Coach Wyking Jones was a little more realistic and was just hoping the Golden Bears could make a few defensive stops to get their offense going.
Jones got his wish down the stretch with a flurry on both ends that gave Cal a much-needed win after a non-conference slate full of disappointment and lopsided losses.
Justice Sueing scored eight points in the final three minutes and California rallied from 17 points down in the second half to stun Stanford 77-74 on Saturday night in the Pac-12 opener for both teams.
"Really proud of my guys and the staff for the fight and not throwing in the towel, just staying with it and chipping away," Jones said. "We've been in this situation a couple times this year and found a way tonight."
It wasn't easy and certainly not foreseeable.
The Bears (7-7, 1-0) looked listless and out of sync for most of the game and trailed 65-48 but outscored the Cardinal 27-8 over the last 7 1/2 minutes to win at Maples Pavilion for the first time since 2014.
Sueing fueled the comeback with a pair of three-point plays, both coming as part of an 18-4 game-ending run by California. Darius McNeill and Grant Anticevich added 3-pointers during the run and Don Coleman made a pair of free throws with 17 seconds left.
Sueing finished with 18 points, Marcus Lee had 19 points and seven rebounds, Coleman scored 15 points and McNeill added 13 for California.
"Early in the season we'd get down and we just stayed down and we wouldn't try to pick back up," Sueing said. "Staying together, we got the win tonight. It's a huge boost of confidence for all of us. We showed what we can do when we stay together."
Dorian Pickens scored 13 points in his return after missing seven weeks with a foot injury but missed two shots down the stretch for Stanford (6-8, 0-1). Michael Humphrey added 15 points and 13 rebounds, Reid Travis had 15 points and eight rebounds, and Kezie Okpala scored 11.
"Just weren't able to get stops," Pickens said. "When you're not able to get stops, it'll kill you."
It was the first time since 1971-72 that both teams entered conference with a losing record.
California certainly played to that theme early and looked like it was headed for another loss before the Bears made their late surge.
It was a much-needed shot in the arm for Jones' team, which has suffered losses to UC Riverside, Chaminade, Central Arkansas and Portland State this season.
"Once we cut it below 10 I felt like we had a great chance to win if we could just get stops," Jones said. "We were scoring. It was just about getting stops."
Stanford shot well early and had little trouble scoring against California's zone defense. Travis had six points as part of a 13-0 run and Robert Cartwright made a 3-pointer to cap an 11-4 run.
The Cardinal also held the Bears scoreless for two long stretches that covered more than nine minutes.
Lee, a 6-foot-11 transfer from Kentucky, scored Cal's first four points but struggled the rest of the first half after picking up a pair of charging penalties that limited him to eight minutes.
Jones took his team out of the zone with about five minutes left in the second half and had the Bears play man-to-man defense the rest of the way. "Made a huge difference," Jones said. "Once our guys got settled in and saw what they were trying to do, we did a better job of containing our men off the dribble."
California: The Bears were on the verge of being held to a season-low for scoring in the first half before two late baskets pulled them within 37-24 at halftime. . McNeill was called for a technical foul midway through the second half.
Stanford: Pickens returned after missing 11 games with a left foot injury. . At one point in the first half the Cardinal had four freshmen on the court.
California: Plays USC at Haas Pavilion on Jan. 4.
Stanford: Hosts UCLA on Jan. 4.
Wieskamp scores 24, No. 23 Iowa routs Illinois 95-71
Freshman Joe Wieskamp matched a career high with 24 points and No. 23 Iowa routed Illinois 95-71 on Sunday for its fifth straight victory.
Iowa gets hot from beyond the arc in 2nd half
s cut Iowa's lead to 11, but Iowa goes on to knock down five 3-pointers in a short amount of time to put the game away.
Salnave's late basket gives Monmouth 83-81 win over Iona
Ray Salnave, who put the game in jeopardy with a late turnover, immediately redeemed himself by hitting a short floater with 1.1 seconds left that lifted Monmouth to an 83-81 win over Iona on Sunday.