MIAMI GARDENS, Fla. (AP) Miami used its backup quarterback and a kicker who had not seen game action since high school three years ago.

And the Hurricanes might have saved their season.

N'Kosi Perry threw for a touchdown on the opening drive and ran for another with 2:31 remaining, Turner Davidson was 3 for 3 on kicks to at least temporarily solve a Miami problem at that position, and the Hurricanes knocked off No. 20 Virginia 17-9 on Friday night.

''I think the neatest thing about our team this year is that we just don't panic,'' Miami coach Manny Diaz said. ''When things are going poorly, our guys get back out there and continue to fight again.''

Deejay Dallas caught the touchdown pass for Miami (3-3, 1-2 Atlantic Coast Conference), plus rushed for 63 yards on 13 carries. Pat Bethel blocked a field goal for Miami and K.J. Osborn caught four passes for 60 yards.

The win kept the Hurricanes from falling to 0-3 in conference play - any conference - for what would have been the first time in school history. Perry, playing in place of injured starter Jarren Williams, finished 16 of 27 for 182 yards.

''Virginia is a tough nut to crack on defense,'' Diaz said.

Bryce Perkins connected on his first nine passes and finished 24 for 41 for 244 yards for Virginia (4-2, 2-1). The Cavaliers entered ranked, yet were still 2 1/2-point underdogs at kickoff.

And apparently, those oddsmakers saw this coming.

Brian Delaney made three field goals for the Cavaliers, who were looking for their first 3-0 ACC start since 2007. They're now tied with North Carolina for first place in the Coastal Division, and could be joined there by Duke if the Blue Devils beat Georgia Tech on Saturday.

Virginia has managed only 12 points - all off field goals - in its last six quarters.

''Red zone,'' Perkins said. ''We've got to score in the red zone. That's plain and simple. We had multiple drives to the red zone and not a single touchdown. So that's on us. That's on the offense. Defense did its job holding the pillar, and we didn't do ours.''

Miami went 78 yards in 11 plays on the game's first possession, with Dallas taking a short pass from Perry and rumbling the rest of the way for a 17-yard score. The Hurricanes' next six drives went nearly nowhere - 33 yards on 23 plays, all six possessions ending in punts.

But the defense more than did its part. Virginia got inside the Miami 30 on six separate possessions, and came away with only the three field goals. Particularly costly: a blocked field goal in the second quarter and a fumble in the third quarter.

''Those two opportunities that we didn't capitalize on hurt our team,'' Virginia coach Bronco Mendenhall said.

And Miami finally got moving in the fourth, getting 147 of its 265 total yards on its final two drives - turning them into a field goal and Perry's straight-ahead 3-yard keeper for a score.

''What changed today is that the team that made the plays in the fourth quarter was the Miami Hurricanes,'' Diaz said.

THE TAKEAWAY

Virginia: CB Bryce Hall, a preseason All-American and the national leader in pass breakups last season with 22, was taken off on a cart in the second quarter after a lower leg injury. He was hurt in punt coverage and the injury was quickly placed in an air cast, after trainers initially covered it with towels to shield others from seeing the severity. That will be a major blow to the Cavaliers.

Miami: Davidson won the kicker job for the night in warmups over two-year starter Bubba Baxa, who missed a critical extra point that would have given Miami a late lead last week against Virginia Tech. Baxa missed three field goals of 30 yards or less so far this year, plus two PATs. Davidson last kicked in a game Nov. 11, 2016, making a field goal for San Antonio's Ronald Reagan High. Miami defensive back Trajan Bandy was asked if he knew the kicker's name before Friday night and said ''I definitely did not'' - then clarified Saturday morning by saying he thought the question was about Delaney, Virginia's kicker.

POLL IMPLICATIONS

Virginia will likely fall from the AP Top 25 when the next poll is released Sunday, ending a run of five consecutive appearances. Virginia hasn't had an appearance streak of six weeks or more since a 21-poll run spanning the 2004 and 2005 seasons.

YARDLESS SCORING DRIVE

Joe Reed had a 72-yard kickoff return in the fourth quarter to get Virginia deep into Miami territory, but the Cavaliers settled for a field goal after what became a seven-play, zero-yard drive.

ODD SERIES

Miami safety Amari Carter was ejected for targeting in the third quarter, meaning he'll miss the first half of next week's game against Georgia Tech. When Virginia's offense lined up to resume play, Carter was still on the field - earning him another penalty for an illegal substitution.

UP NEXT

Virginia: Host Duke on Oct. 19, Virginia's first home game since Sept. 21.

Miami: Host Georgia Tech on Oct. 19, ending a five-game homestand.

---

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

Copyright 2019 by STATS LLC and Associated Press. Any commercial use or distribution without the express written consent of STATS LLC and Associated Press is strictly prohibited.