BERKELEY, Calif. – The Arizona Wildcats’ magical unbeaten streak is over, and they may have lost a key player at the same time.

Cal guard Justin Cobbs hit an 18-foot jumper with one second left to give the Bears a 60-58 upset of the No. 1- ranked Wildcats before a rowdy sold-out crowd at Haas Pavilion tonight.

Worse, potentially, for UA was the fact that forward Brandon Ashley was lost to a foot injury early in the game and could be out for an indefinite amount of time.

Ashley went down just two minutes into the game after taking an awkward fall after he missed a shot. He went to the Wildcats’ locker room for about 10 minutes and then returned with his right foot bare and wrapped in ice, then returned in the second half with crutches and a boot on his foot.

There was no immediate word from UA on the potential severity of the injury.

Cal led by a point at halftime and the game became increasingly tense into the final minutes before a sellout crowd at Haas Pavilion, where all fans were given gold T-shirts before the game.

McConnell made a layup to give UA a 58-56 lead after a series of turnovers with just over two minutes left but Cobbs hit two free throws to tie it up and David Kravish defended a layup attempt from Tarczewski that gave Cal the ball with the game tied entering the final two minutes.

But the Bears coudnt get off a shot on their ensuing possession and the Wildcats couldn’t either, when Rondae Hollis-Jefferson was stripped of the ball under the basket.

Entering the final minute, Kravish missed a hook shot with 51 seconds left that gave UA the ball with 51 seconds left and the score tied at 58 before Nick Johnson missed a floater with 17 seconds.

That set up Cal’s final play, when Cobbs darted away from Johnson on the perimeter and set up his game-winner from the right side of the perimeter. Fans rushed the court with 0.9 seconds left, thinking the game was over, and had to be ushed forcibly off it to allow the Wildcats a final play.

Arizona’s Gabe York inbounded a three-quarter court pass to Aaron Gordon, but the ball was eventually grabbed away from Cal’s Richard Solomon, who raced downcourt but couldn’t reach the sideline before giddy fans bowled him over.

The loss left Arizona 21-1 overall and 8-1 in the Pac-12, at the halfway point of the conference season. The Wildcats will next play Oregon on Thursday at McKale Center.

Cal improved to 15-7 and 6-3. It was the Bears’ first win over a No. 1-ranked team since team since Jason Kidd had a triple-double (18 points, 14 rebounds and 12 assists) to lead the Bears over UCLA on Jan. 30, 1994 at the Oakland Coliseum. Cal is now 3-24 overall against top-ranked teams.

Earlier in the second half, Tarczewski kept the Wildcats alive in the second half with his free throw shooting. He made 12 of 12 free throws and is now 32 of 36 (88.8 percent) in Pac-12 games from the line.

Tarczewski led UA in scoring overall with a career-high 18 points, while McConnell had 13 points and Gordon had 13 rebounds.

Midway through the second half, Cal took a 50-42 lead but the Wildcats scored eight straight to cut it to 50-48 entering the final nine minutes and kept it close the rest of the way.

Arizona struggled with shooting early in the second half, and made up for it by outrebounding the Bears, as it did in the first half. Over the first seven minutes after halftime, Cal hit 5 of 9 shots while UA was 2 for 7, roughly the same formula that the first half had.

In the first half, Cal took a 30-29 halftime lead over the Wildcats while Ashley suffered his foot injury early in the game.

Meanwhile, the Wildcats allowed the Bears to shoot 46.7 percent from the field while shooting only 30 percent themselves.

The Wildcats trailed by as many as nine in the first half but managed to battle back to one before halftime.

The Wildcats missed their first four shots of the game, the last one a hook by Ashley just before he was hurt, and didn’t score until McConnell hit a mid-range jumper with 17:16 to go.

Cal took early leads of 6-2, and after UA tied it at 9-9, didn’t trail the rest of the first half. The Bears led 22-17 when Solomon scored twice inside and went on to make it a 10-2 run that gave them a 28-19 lead with 5:18 to go in the first half.

At that point, UA coach Sean Miller had already begun to reach deeper into his bench than at any point this season during a critical time: He used forward Matt Korcheck shortly after Ashley left, and guard Elliott Pitts late in the half.

Pitts had only played in one previous Pac-12 game, against ASU, while Korcheck played against ASU and WSU.