Three weeks and home court advantage can make a world of difference in college basketball. That was the takeaway late Saturday night after Arizona State roared back from a 22-point deficit to beat No. 22 Arizona 66-65 in the final seconds.

Alonzo Verge Jr. made a layup with 10.9 seconds left to put the Sun Devils (12-7, 3-3 Pac-12) ahead, and the Wildcats (13-6, 3-3) failed to get a foul call in the final seconds as Arizona State avenged its 75-47 loss to Arizona from Jan. 4 

Arizona's Josh Green collided with ASU forward Taeshon Cherry as he attempted a potential game-winner in the final seconds. But there was no whistle, and mayhem ensued inside Wells Fargo Arena as the Sun Devils celebrated their first win this season over a ranked opponent.

"Once we put two halves together, we're going to be hard to beat," Arizona State leading scorer Remy Martin told reporters after the game. Martin scored 13 of his 24 points in the second half as his team back from a deficit that reached 37-15 late in the first half.

Arizona State was picked in the Pac-12 media poll to finish sixth in the Pac-12 before the season and picked Arizona to finish fourth. Saturday's outcome put the rival programs on equal ground six games into conference play, and it was critical for Arizona State's hopes of qualifying for a third straight NCAA Tournament.

The Sun Devils were 0-6 in Quadrant 1 games entering the night. They play at Washington State on Wednesday. Arizona is back in action on Thursday at Washington.