TUCSON, Ariz. -- Anu Solomon hit Austin Hill on a 47-yard Hail Mary on the game's final play and Arizona scored 36 points in the fourth quarter to pull off an improbable 49-45 win over California Saturday night.

Cal (2-1, 0-1 Pac-12) threatened to turn Arizona's whiteout into a blowout, deflating the Wildcats and their white-shirt-wearing fans with two quick scores and a 22-point halftime lead.

Arizona (4-0, 1-0) charged back behind Solomon, who threw for 520 yards and had four of his five touchdown passes in the fourth quarter.

The Wildcats recovered an onside kick after Cal was called for a batting penalty and pulled within two after Solomon hit Cayleb Jones on a 15-yard scoring pass.

Arizona got the ball back with less than a minute left and pulled off the miracle when Hill, a senior who missed last season with a torn ACL, brought the ball down among five Cal defenders.

Solomon shook off a pair of first half interceptions to complete 47 of 73 passes, both school records. Jones caught 13 passes for 186 yards.

Arizona finished with 627 total yards, and Cal had 573.

Behind Jared Goff, who threw for 380 yards and three touchdowns, Cal led 31-16 heading into the fourth quarter.

That's when Arizona kicked its high-octane offense in gear, marching for one score after another.

Solomon hit Hill on a 9-yard touchdown pass, then Jones on a 16-yarder after Khalfani Muhammad scored on a 50-yard touchdown run. Muhammad scored again on a 6-yard run to put Cal seemingly in good position, up 45-30 with just over 5 minutes left.

But the Wildcats kept coming.

Arizona marched for a 6-yard touchdown run by Terris Jones-Grigsby then recovered a second try at an onside kick after Cal's batting penalty. Jones, who had 13 catches for 186 yards, pulled down a 15-yard pass from Solomon with 2:44 left, but the Wildcats' two-point try failed.

With a chance to put the game away, Cal couldn't finish it off. James Langford hooked a 47-yard field goal left, turning the ball over to Arizona at its own 29-yard line with 52 seconds left.

Solomon completed a couple of short passes before finding Hill on a 20-yard pass that moved the chains and briefly stopped the clock. Arizona raced to the line and Solomon spiked the ball to set up the final shot at the end zone.

Hill came down with it, sending the Wildcats streaming from their sideline and the Bears collapsing to the turf.