CHAPEL HILL, N.C. (AP) Eighth-ranked Miami is still unbeaten, even if it isn't coming easy.

Malik Rosier threw for a career-high 356 yards with three touchdowns to help the Hurricanes hold off North Carolina 24-19 on Saturday, though they struggled to put away an injury-riddled team despite entering the game as 20-point favorites.

Miami (7-0, 5-0 Atlantic Coast Conference) didn't score its first touchdown until the final minutes before halftime and had two turnovers, most notably when Travis Homer coughed up a late fumble that gave UNC the ball with a chance to drive for a winning score. Still, Miami came up with a pair of key plays to stay atop the league's Coastal Division standings.

''A lot of good things happened,'' Miami coach Mark Richt said. ''Just not clean enough for me personally.''

Rosier had a 51-yard touchdown throw to Christopher Herndon IV late in the first half, a 78-yarder to Jeff Thomas to open the third quarter and a 5-yarder to Braxton Berrios to give the Hurricanes a 24-13 fourth-quarter lead.

Rosier missed a first-half series because of an apparent shoulder injury. The team didn't make him available for comment after the game, saying he was receiving treatment.

UNC (1-8, 0-6) got within 24-19 on freshman Beau Corrales' second touchdown catch with 3:03 left, then came up with Homer's fumble with 2:56 to go. But after pushing across midfield and near the Miami 35, UNC's Jordon Brown lost a fumble - recovered by Jaquan Johnson - with 2:11 left.

Then Rosier ran for a chains-moving 7-yard keeper on third down, allowing Miami to run out the clock.

''Obviously us as an offense, we kind of felt a little bit down because we didn't do what we needed to do or executed the way that we wanted to,'' Miami offensive lineman Kc McDermott said. ''But at the same time, a win's a win.''

Nathan Elliott threw for one touchdown and three interceptions for UNC after starter Chazz Surratt was knocked from the game in the opening quarter.

''They go out there, and they care about each other, they love each other, and they play hard together,'' UNC coach Larry Fedora said. ''But we still made too many mistakes to overcome to win a football game, especially against a really good football team.''

THE TAKEAWAY

Miami: The Hurricanes went from squeaking by in their last three wins by a combined 13 points to struggling much of the day against a 1-7 team relying on a third-string quarterback. Not the best way to go into the November stretch run, even as they remain unbeaten.

''I know this: If we keep a cool head and we make good decisions and we execute what we're calling, we've got a chance to come back and win,'' Richt said. ''That's what I think the team has done, even in the tightest of circumstances.''

UNC: The Tar Heels responded to last week's blowout loss at Virginia Tech with a better showing. Still, UNC's offense struggled in the red zone by getting just three points on three first-half trips. And the defense repeated its habit of surrendering a couple huge plays to wipe out long stretches of solid execution, sending UNC - down 22 players because of injuries - to 0-6 in the ACC for the first time since 2006.

HAND SIGNALS

Berrios remembered Miami's 59-21 loss at North Carolina from two years ago, complete with Tar Heels players flashing the Hurricanes' famous ''U'' handsign upside down in celebrations. That's why Berrios popped up from his short TD catch, then turned the upside-down back up in gesture to the crowd.

''It hasn't really left my mind since we came up here two years ago and we got embarrassed, utterly embarrassed,'' said Berrios, an instate native of nearby Raleigh. ''You lose a game, but when you get disrespected like that it sticks with you for a while. I told my wide receiver group: If I got in, I was going to make sure the U was held up properly.''

UP NEXT

Miami: The Hurricanes host No. 13 Virginia Tech on Nov. 4 in a key Coastal Division matchup.

UNC: The Tar Heels have an off week before going to Pittsburgh on Nov. 9.

---

More AP college football: http://collegefootball.ap.org and http://www.twitter.com/AP-Top25

---

Follow Aaron Beard on Twitter at http://www.twitter.com/aaronbeardap

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