DURHAM, N.C. (AP) Virginia Tech's offense hummed right along with backup quarterback Ryan Willis. The defense barely resembled the leaky group that took the blame for a humiliating loss.

There wasn't anything wrong with these Hokies that another trip to Duke couldn't fix.

Willis threw for 332 yards and a career-best three touchdowns in his first start for the Hokies, helping them upset No. 22 Duke 31-14 on Saturday night.

Willis, a transfer from Kansas taking over for injured starter Josh Jackson, was 17 of 27 with a 27-yard TD pass to Damon Hazelton, a 67-yard catch-and-run score to Dalton Keene and a game-sealing 10-yarder to Phil Patterson to help Tech steer way clear of its first loss in Durham since 1981.

''I felt comfortable with him in there - we've been watching him practice for going on two years now, so we know he has some talent,'' coach Justin Fuente said. ''He made plays for us, and he gave our guys some opportunities to make plays.''

Humiliated in a 14-point loss at Old Dominion last week, the Hokies (3-1, 2-0 Atlantic Coast Conference) bounced back strong, leading virtually all night to earn another lopsided road victory against a ranked league opponent. They routed then-No. 19 Florida State 24-3 in the opener.

''The air was definitely out of their balloon'' after the Old Dominion loss, Fuente said. ''They had taken a gut punch, to say the least. . When we hit the practice field Tuesday, we hit it running, like a hungry football team. The challenge, and it's a really big challenge for young football teams, is to try and maintain that level of intensity and attention to detail, week in and week out.''

Daniel Jones - back in the starting lineup three weeks after breaking his collar bone - was 23 of 35 for 226 yards with a 23-yard touchdown pass to Noah Gray and an interception for the Blue Devils (4-1, 0-1).

''He played with no fear. He wasn't antsy in the pocket,'' coach David Cutcliffe said. ''We can play better overall around him. I didn't see anything I would change about him.''

Deon Jackson had a short touchdown run that cut the deficit to 24-14 early in the fourth quarter. Ranked for the first time since 2015, they were denied their first 5-0 start since 1994 and instead saw the end of a seven-game winning streak that dated to last season.

''They made the plays they had to make,'' Cutcliffe said. ''I don't know if we made any of them.''

Steven Peoples had a 6-yard touchdown run and Brian Johnson kicked a 28-yard field goal for the Hokies.

THE TAKEAWAY

Virginia Tech: These Hokies looked nothing like the crew that gave up seven touchdowns and 631 total yards - the worst in a quarter-century with defensive coordinator Bud Foster - at Old Dominion. This time, they held Duke to almost half of that (327). When they had the ball, Willis didn't look much like a backup - instead teaming with his receivers to make Duke's young secondary look, well, young.

Duke: The Blue Devils won't like these parallels, easy as they are to draw. For the second straight year, a 4-0 start was wiped out by a no-show loss at home in the league opener against a high-profile Coastal Division opponent; Miami had that honor in 2017, routing Duke 31-6 a year to the day before this one. Now the challenge is to prevent a repeat of what followed that one: A six-game losing streak that put bowl eligibility in peril.

''We have a more mature football team that's been through more together,'' Cutcliffe said. ''This business is never easy. Winning streaks are a lot harder than losing streaks, you know. . It takes maturity to not let one loss become two.''

POLL IMPLICATIONS

The Blue Devils' first Top 25 appearance since October 2015 is going to be a short one. This was the second time since 2014 that a ranked Duke team lost at home to unranked Virginia Tech.

KEY SEQUENCE

Willis and the Hokies responded after the Blue Devils cut it to 10 early in the fourth quarter. He led Virginia Tech 75 yards in 10 plays after that score and converted a fourth-and-inches inside the red zone that Duke unsuccessfully challenged. On the next snap, Willis found Patterson - who made the catch despite cornerback Jeremy McDuffie grabbing a handful of his jersey, drawing a pass interference flag that the Hokies declined.

KEY STAT

Virginia Tech kept the sticks moving way more often than Duke did, converting 6 of 16 third downs - many coming in important situations - while holding the Blue Devils to 4 of 16. The Hokies completed 7 of 9 third-down passes for 123 yards.

UP NEXT

Virginia Tech: Plays host to No. 8 Notre Dame next Saturday night.

Duke: Has next weekend off to regroup and prepare for Georgia Tech on Oct. 13.

---

(This version corrects Virginia Tech's overall record to 3-1.)

---

More AP college football: https://apnews.com/tag/Collegefootball and https://twitter.com/AP-Top25

Copyright 2018 by AP. Any commercial use or distribution without the express written consent of AP is strictly prohibited.