TEMPE, Ariz. (AP)Trenton Bourguet was a fifth-string walk-on four years ago and spent the spring in a walking boot when he wasn’t practicing.

The Arizona State quarterback prepared as if he was going to be the starter no matter where he was on the depth chart or how bad his foot hurt – a mentality that paid off in a huge way for the Sun Devils.

Called into action after Emory Jones was injured, Bourguet threw for three touchdowns and orchestrated Arizona State’s offense to near perfection in a 45-38 victory over No. 21 Washington on Saturday that gave interim coach Shaun Aguano his first victory.

”He’s not the tallest or the strongest, but he has the traits to be a good quarterback,” Aguano said. ”Once you have that opportunity, make sure you take advantage of it and he did that.”

The Sun Devils (2-4, 1-2 Pac-12) lost their first two games after Herm Edwards was fired Sept. 18, though played No. 6 Southern California close last week before fading late.

Bourguet, who had offseason foot surgery, adeptly led the offense after Jones was injured in the second quarter against Washington, throwing for 182 yards on 15-of-21 passing with an interception. He hit Elijhah Badger for two touchdowns, including a 2-yarder in the fourth quarter to put the Sun Devils up 45-38.

Arizona State stopped the Huskies on fourth-and-9 near midfield and a botched snap all but ended the Washington’s final drive.

”Once you get smacked in the mouth enough times you’re going to get up and land the first and last punch,” said Arizona State’s Xazavian Halladay, who accounted for 133 yards and two touchdowns.

Washington (4-2, 1-2) had a solid offensive day in the desert, rallying from a 14-point deficit to tie it on Cameron Davis’ third rushing TD, from 5 yards out. Michael Penix Jr. threw for 311 yards on 33-of-53 passing, but no touchdowns.

The Huskies struggled defensively in last week’s loss to UCLA and continued to have breakdowns as injuries mounted against the Sun Devils to remain winless in Tempe since 2001 (eight games).

”Second week in a row coming down to the wire,” Washington coach Kalen DeBoer said. ”We’re giving ourselves a chance to win the game, but we’ve got to do a better job earlier in the game. We’re just digging ourselves a hole.”

A three-year after a redshirt, Bourguet was sharp after Jones took a shot to the head in the second quarter from Washington safety Asa Turner, who was ejected for targeting.

Halladay scored on an 11-yard run the next play and Bourget followed with a 14-yard TD pass to Halladay, throwing to the flat with a blitzing defender in his face.

Arizona State went up 24-10 when Penix had a pass deflected at the line of scrimmage and Jordan Clark intercepted it for a 38-yard touchdown.

Washington grabbed a bit of momentum back, pulling within 24-17 at halftime on Wayne Taulapapa’s 1-yard TD run.

After Arizona State stuffed the Huskies on fourth-and-1 at their own 32, Bourguet followed with another superb throw with pressure in his face, finding Badger in the back of the end zone for a 10-yard TD and a 31-17 lead.

Washington’s Cameron Davis scored on a 4-yard TD run, but Bourguet then split two defenders with a pass to Bryan Thompson for a 38-yard gain to the 1. Daniyel Ngata scored on the next play to put Arizona State up 38-24.

”This is what I’m supposed to do as a backup quarterback, be prepared, and I’m glad we came out with a W,” Bourguet said.

THE TAKEAWAY

Washington: Consecutive letdowns are sure to drop the Huskies out of Sunday’s AP Top 25. Washington couldn’t slow the Sun Devils even after knocking out Arizona State’s starting quarterback to lose consecutive games after a 4-0 start.

Arizona State: A week after giving USC a test, the Sun Devils handed Aguano his first win with their best offensive game against an FBS opponent this season.

SCARY HIT

Penix took a huge hit on Washington’s final drive after being sandwiched between two defenders. Arizona State’s BJ Green was hit with a targeting penalty on the play after hit helmet hit Penix in the throat and left the Washington quarterback gasping for air.

”It was a shock,” he said. ”It was scary, but I’m good.”

Washington’s trainers attended to Penix for several minutes before he gingerly walked to the sideline. Given time to catch his breath, he ran back onto the field after missing one play.

”It says a lot about him,” DeBoer said. ”He’s been a fighter his entire life and I’m super proud of him.”

UP NEXT

Washington hosts Arizona next Saturday.

Arizona State is at Stanford Saturday.

More AP college football: https://apnews.com/hub/college-football and https://twitter.com/ap-top25. Sign up for the AP’s college football newsletter: https://bit.ly/3pqZVaF