STANFORD -- Gabe York made a long 3-pointer with 8:24 left on the way to 19 points, and No. 12 Arizona survived a Stanford rally midway through the second half for a 71-57 victory Thursday night.
Ryan Anderson added 18 points on 7-for-7 shooting and eight rebounds for the Wildcats (16-3, 4-2 Pac-12) in their 12th straight win against the Cardinal dating to a loss on Jan. 4, 2009.
Arizona's Kadeem Allen went down in the corner by his team's bench with 10:55 left then briefly left for the locker room before returning.
Grant Verhoeven provided a big lift in the second half for Stanford (10-7, 3-3), but the Cardinal went cold when it counted as Arizona pulled away for good.
Verhoeven's three-point play with 15:35 remaining pulled Stanford within 39-37, then he converted another three-point play at 14:19 before a pair of missed free throws by Kaleb Tarczewski. Verhoeven took a charge at 13:20.
Stanford then made just two of its next 14 field-goal tries and went nearly 9 minutes between baskets.
Wildcats coach Sean Miller won his 299th game and could reach 300 victories Saturday night against California in Berkeley.
Arizona, the two-time defending Pac-12 champion picked to win again, has won three in a row since a 103-101 four-overtime loss at USC on Jan. 9.
Arizona's 12 straight wins in the series mark the program's longest active winning streak in the conference against any opponent - but the previous two games on Stanford's home floor in Maples Pavilion were decided by 10 total points.
Two years ago and ranked No. 1, Arizona escaped with a 60-57 win, then an 89-82 victory by the seventh-ranked Wildcats last January.
Marcus Sheffield scored 17 points for the Cardinal, coming off a 77-71 win against Bay Area rival Cal on Thursday. They faced a team either ranked or receiving votes in the AP poll for the fifth time in six games and shot 4 for 21 from 3-point range.
Arizona's Parker Jackson-Cartwright, who had two big games in sweeping the Washington schools last weekend with 13 total points and 18 assists, was limited to no points and three assists.
The Cardinal began the game 1 for 8 to fall behind 12-4 but Arizona had an offensive drought of its own missing nine of 10 shots during a stretch late in the half as the Cardinal stayed within 31-30 at the break.
Arizona: The Wildcats committed nine first-half turnovers but outrebounded Stanford 42-29. ... Miller is 11-0 against Stanford and 50-18 against universities from the state of California, with the Wildcats winning 13 of their last 19 games in California in the regular season and NCAA tournament.
Stanford: Jim Plunkett, Stanford's only Heisman Trophy winner, sat courtside next to fellow quarterback and two-time Heisman runner-up Andrew Luck of the Indianapolis Colts. ... The Cardinal are 12-22 against ranked opponents under eighth-year coach Johnny Dawkins. Arizona was the second-highest ranked team Stanford faced after a loss to No. 8 Villanova in November. The Cardinal beat No. 21 Utah 70-68 in overtime at home Jan. 1.
Arizona: At California on Saturday.
Stanford: Host Arizona State on Saturday.