STANFORD, Calif. (AP) - K.J. Costello returned to Stanford's starting lineup and led the Cardinal to a 41-31 victory over visiting Arizona on Saturday.
The senior quarterback threw for 312 yards and three touchdowns after missing three games with a thumb injury.
The Wildcats went with two quarterbacks, starting the athletic Kahlil Tate, who passed for 205 yards and a pair of touchdowns and rushed for 103 yards and a touchdown.
Showing no signs of discomfort, Costello rifled passes to 12 different receivers, including a pair of touchdown passes to Simi Fehoko and one to Brycen Tremayne, whose only two receptions have both gone for touchdowns.
Connor Wedington caught seven passes for 61 yards for Stanford and Michael Wilson had six for 45 yards.
Cameron Scarlett rushed for 102 yards and scored twice. Freshman Ryan Sanborn added a pair of field goals.
J.J. Taylor rushed for 107 yards for the Wildcats, surpassing 3,000 for his career.
Jamarye Joiner and Drew Dixon caught TD passes from Tate, who moved into eighth-place on Arizona's all-time passing yards list.
Freshman Grant Gunnell played two consecutive series in the first half, leading the Wildcats on an efficient eight-play, 65-yard scoring drive in which he completed all three passes attempted for 34 yards including an 8-yard scoring toss to Jalen Johnson.
Tate returned to the lineup after Stanford took a 21-10 lead and needed two plays to go 75 yards. Tate raced 57 yards for the score. He tucked the ball in after faking a pass and ran untouched.