Updated

No. 19 Duke's highest national ranking in two decades is certainly gone — and so is much of the Blue Devils' breathing room in the ACC's Coastal Division.

All because they couldn't take care of the ball.

Duke turned it over three times and those giveaways led to all of Virginia Tech's points in a 17-16 upset on Saturday.

"They're good at taking advantage of mistakes that you make, and they did that," Duke coach David Cutcliffe said. "Defensively, (Tech defensive coordinator Bud Foster) is about as good as there is. He created issues for us that we didn't respond to very well."

Duke (8-2, 4-2 Atlantic Coast Conference) began the day with six total turnovers — no Bowl Subdivision team had fewer — but now has given it away three times in each of its two losses.

Anthony Boone was 18 of 40 for 181 yards, but he was intercepted twice and DeVon Edwards fumbled a kickoff to set up the go-ahead touchdown for Virginia Tech.

It could have been worse: the Blue Devils recovered three of their own fumbles, including two on consecutive snaps.

"If you're topping the turnovers," coach Frank Beamer said, "you're usually going to have a pretty good shot to win the game."

Michael Brewer was 12 of 23 for 138 yards with two touchdowns, covering 15 yards to Bucky Hodges and 10 yards to Isaiah Ford, for the Hokies (5-5, 2-4).

They overcame six sacks — and a bizarre failed fake punt that set up Duke's next-to-last chance — to avoid their first in-season four-game losing streak since 1992 and earn their second road victory over a ranked team this year.

This one might not carry the same national cache of that 35-21 stunner at then-No. 8 Ohio State two months ago, but this one was no less significant for a Hokies team trying to earn its 22nd consecutive bowl appearance.

"You look at our record, you think, 'Oh man, Tech's having a terrible year this year,'" linebacker Derek Di Nardo said. "We've been in most of the games until the fourth quarter. ... It's a breath of fresh air."

Duke had two late chances to reclaim the lead, but Ross Martin missed a 40-yard field goal with 2:26 left and the Blue Devils were stopped on downs at their 40 with 43 seconds left.

Josh Snead scored the lone touchdown for the mistake-prone Blue Devils, who began the day alone atop the Coastal.

Duke had two chances late, first advancing to the Tech 22 before Martin — who began the day having made all 13 of his field goals — was wide left.

The Blue Devils forced a three-and-out and got the ball back at their 40 with 2 minutes left, but Boone was sacked on consecutive plays before safety Detrick Bonner pressured him into a no-chance incompletion on fourth-and-21.

"It's a gamble that you're bringing ... two secondary guys off the edge," Beamer said. "It's a little bit of a gamble that worked out."

Two Duke miscues came on back-to-back series that helped Virginia Tech — which hadn't forced a takeaway since Oct. 16 — escape a 16-7 deficit.

Breon Borders picked off a Brewer pass at the Virginia Tech 36 but three plays later, Boone was hit while throwing and Di Nardo returned the interception to the Duke 9 to set up Joey Slye's 35-yard field goal that made it 16-10 on the final play of the third.

Edwards' fumble set up Brewer's scoring pass to Hodges on a post pattern to put the Hokies ahead to stay with 12:47 left.

Martin kicked three field goals, including a 24-yarder that made it a nine-point game, but the Hokies were content to let Duke settle for three points at a time instead of seven.

"We probably did leave some points on the field," Cutcliffe said. "Field goals and touchdowns are two really different things."

That helped them hang around and avoid being blown out — at one point, Duke outgained Virginia Tech 123-7. The Blue Devils had 121 yards rushing in the first quarter — but just 64 the rest of the game.

Momentum took a complete 180 on the first play of the second quarter, when Deon Clarke intercepted Boone's deep throw at the Virginia Tech 2. Instead of being down big, the Hokies drove 98 yards and pulled to 10-7 on Brewer's corner fade to Ford.

___

Follow Joedy McCreary on Twitter at http://twitter.com/joedyap