TEMPE, Ariz. (AP) -- Arizona State was firmly in control, playing well at both ends to keep its lead hovering around double digits.
Then California started switching defenses, from man, to zone, back to man.
Not sure whether to attack or sit back, the Sun Devils became tentative, hanging on instead of rolling away.
Arizona State figured it out just in time, making enough free throws down the stretch to hold off Cal 66-62 Thursday night after nearly blowing all of a 16-point lead.
"We were a little bit like somebody who was forced to drive a stick shift, but never had a real good lesson," Arizona State coach Herb Sendek said.
Arizona State (18-5, 7-3 Pac-12) appeared to be on its way to an easy win, keeping the Bears at bay after using a 17-3 first-half run to go up 16 points. But coming out of a timeout with just under 8 minutes left in the game, Cal starting shifting its defenses and the Sun Devils had a hard time finding an answer, tossing up bad shots late in the shot clock on several possessions.
Cal (13-9, 5-5) pulled within three on a 3-pointer by Justin Cobbs with just over a minute left and had it down to 64-62 after he hit another with 22 seconds left.
Evan Gordon hit 1 of 2 free throws for the Sun Devils, giving the Bears a chance to tie. But Arizona State forced Allen Crabbe into a turnover with 9 seconds left and Jonathan Gilling sealed it by hitting 1 of 2 from the line after that.
Gordon had 23 points to lead Arizona State and Jahii Carson had 12 points, but also committed five of Arizona State's 17 turnovers.
The big lift came from center Ruslan Pateev.
The 7-foot center had one of his most active games of the season, finishing with 12 points and eight rebounds after scoring four points and grabbing five rebounds the three previous games combined.
"He's given us a big boost," Gordon said.
Cal struggled offensively most of the night and only got back into the game because of its defense in the closing minutes. Even then, the Bears couldn't make enough plays to complete the comeback.
Crabbe and Tyrone Wallace had 16 points apiece to lead Cal.
"We just don't have a lot of people that can score the ball," Cal coach Mike Montgomery said. "They were making baskets and we were not making baskets. There is nothing complicated. This game is not that complex."
Cal has had an up-and-down season, but was coming off its best win of the season, a 58-54 victory over No. 10 Oregon on Saturday. It wasn't pretty -- the Bears shot 35 percent and had to rally in the closing minutes -- but it was their first win over a top-10 team in more than five years.
The best defensive stretch of the season sparked Cal's rally from an eight-point deficit in the final 6 minutes against Oregon, but the D was nowhere to be found early against Arizona State.
The Sun Devils shot 62 percent in a 96-92 loss to Washington on Saturday and were still hot at the start against Cal.
Arizona State made 7 of its first 11 shots and kept making them, using a 17-3 run to jump out to a 25-9 lead. Carson was the facilitator instead of scorer, finding Gilling in transition for a 3-pointer and setting up Gordon for a three-point play that put the Sun Devils up 14.
The Bears struggled just as much on offense, going nearly eight minutes without a field goal while turning it over seven times in the first 11 minutes.
Cal rallied with a 10-0 run, but Gordon kept scoring (13 points) and the Sun Devils got a big boost from their big Russian, Pateev, who had a pair of dunks while scoring eight points. Arizona State hit 15 of 30 shots to lead 37-27 at halftime.
"Gordon was playing really well," Montgomery said. "He was driving and making shots and we were just standing there. Nobody was moving."
The Sun Devils kept the lead at double digits for most of the second half, thanks to Gordon and Pateev.
Gordon opened the second half with a 3-pointer from the corner and set up Carrick Felix for a dunk with a backdoor bounce pass. Pateev grabbed an offensive rebound and hit a cutting Gordon for a layup, then flipped in a left-handed hook and a couple of head fakes that drew "ohhs!" from the home crowd. Pateev extended another possession with a back-tap on a rebound and capped it with a basket inside, earning a chant of "Teev!" from the crowd.
"I felt like it was a little bit easier to go in the paint compared to other teams," Pateev said.
Cal rallied after that, though, changing its defense to slow the Sun Devils, who spent the closing minutes taking tough shots against the shot clock.
Arizona State managed to find a way to get a couple of shots to fall down the stretch, pulling out a win that turned out to be much tougher than it needed to be.