BERKELEY, Calif. -- Cal guard Justin Cobbs hit a 17-foot jumper with 0.9 of a second left as the Bears beat No. 1 Arizona 60-58 on Saturday night, handing the Wildcats their first loss of the season.

The score was tied 58-58 when Arizona guard Nick Johnson missed a 10-foot shot in the lane with 15 seconds to go.

Cobbs, who finished with 19 points, then pulled up from the left side and buried his shot with less than a second left to put the Bears ahead. Fans stormed the court but had to be cleared as Arizona called timeout for a last shot.

Arizona failed to get off a final shot and fans stormed the court again.

Johnson, the Wildcats' leading scorer at 16.7 points a game, finished with four points on 1-for-14 shooting from the field for Arizona (21-1, 8-1 Pac-12)

Cal (15-7, 6-3) ended a three-game losing streak.

Arizona played nearly the entire game without starting forward Brandon Ashley, who left with a right-ankle injury about two minutes into the game. Ashley is the team's second-leading scorer, averaging 12.0 points per game. His status for the Wildcats' next game was uncertain.

The Wildcats shot under 31 percent from the field but were 16-for-16 from the foul line, including 12-of-12 by center Kaleb Tarczewski, who finished with 18 points.

Cal forward David Kravish had 14 points and Bears forward Richard Solomon added 12.

Cal increased a one-point halftime lead to four on Cobbs' fast-break layup three minutes into the second half, and when Cobbs hit two free throws with 11 minutes left, the Bears led by eight points.

Arizona rallied to tie the score 54-54 when Tarczewski hit two free throws with six minutes left.

Tarczewski gave Arizona its first lead since early in the first half when he made a 6-foot shot with 4:18 remaining, giving the Wildcats a 56-54 advantage.

Cobbs tied it 58-58 with two free throws with 2:29 to go, but neither team scored again until Cobbs' game-winner.

Cal controlled most of the first half and led 30-29 at intermission.

Solomon hit his first six shots from the floor and his inside basket with 5:15 left in the half gave Cal a nine-point lead at 28-19. At that point, Arizona had hit only 8-of-31 shots (25.6 percent).

Cal still led 30-23 with 3:32 remaining before halftime, but the Wildcats scored the final six points of the half to close the gap to one.

Arizona forward Aaron Gordon had six points, 10 rebounds and five assists in the first half. Solomon had 12 points and seven boards in the first 20 minutes for Cal.

NOTES: Arizona F Brandon Ashley injured his right ankle two minutes into the first half and had to leave the game. ... Arizona began the game as one of three unbeaten Division I teams, along with Syracuse and Wichita State. Last season, there were no unbeaten teams as of Feb. 1. ... The Wildcats started the day ranked 108th nationally in scoring offense but were fourth in scoring defense, yielding just 56.1 points a game. ... Cal entered the game with a 2-24 record against No. 1 teams and had never beaten a top-ranked team on the Bears' home floor. The Bears' two only wins over a No. 1 team came against Cincinnati in the 1960 Final Four at the Cow Palace in San Francisco and against UCLA at the Oakland Coliseum in 1994. ... Two of Arizona's starters are from the San Francisco Bay Area: forward Brandon Ashley, who attended Oakland Bishop O'Dowd High School, and forward Aaron Gordon, who attended Archbishop Mitty High School in San Jose.