CHAPEL HILL, N.C. -- Sam Howell threw two touchdowns and ran for two more as North Carolina held off Miami, 45-42, sending the Hurricanes to their worst record at the midway mark of a season in more than two decades.
The win didn't come easily, though at times it appeared it would. It took an interception of an inexplicable Miami pass with 7 seconds left to seal the victory.
"It's like a roller-coaster. When you hop on it, you feel like you're in good shape and then you go back down and come back (up)," North Carolina coach Mack Brown said. "One thing this team hasn't done this year is won a tough game at the end."
The Tar Heels had lost the second of a three-game homestand last week 35-25 to Florida State but looked ready to play, jumping on the Hurricanes early when Ty Chandler burst for a 51-yard touchdown run just 3:03 into the game.
Miami answered with Jahfari Harvey's 33-yard interception return for a touchdown. That made it 7-7 but after Howell responded with a 45-yard touchdown pass to Josh Downs, the Tar Heels never again trailed.
North Carolina built the lead to 31-17 by halftime but the Hurricanes wouldn't go away, making it a one-possession game several times.
Miami's problem? Its defense couldn't contain UNC's offense, which managed to keep pace.
"This night, we found a way to win," Brown said.
Still, the Hurricanes battled, pulling to within 45-42 when Jaylan Knight, who ran for two Miami touchdowns, scored on a 4-yard run to cap a 97-yard drive with 3:08 remaining that was followed by a successful two-point conversion pass play.
After the Tar Heels got the ball back, they quickly went three-and-out, giving the Hurricanes a final chance to tie or take the lead with 2:46 left.
But after driving to UNC's 11, rather than running the ball to set up a potential tying field goal, the Hurricanes gambled by attempting a pass that was batted up in the air and intercepted by linebacker Cedric Gray.
"We talked about batting balls all week, and our guys found a way to do that," Brown said.
UNC improved to (4-3, 3-3 Atlantic Coast Conference) in a matchup of two teams that began the season in the Top 15 but are trying to gain traction midway through the season.
The Hurricanes (2-4, 0-2) are 2-4 for the first time since 1997 when they were on NCAA probation and stuck with scholarship limitations.
"I'm proud of the way these guys fight. I know that (another win) is coming," Miami coach Manny Diaz said. "There's a really good team in that locker room. We don't have a good record."
Howell finished 17 for 26 for 154 yards in the air with the interception while running for 98 yards on 17 carries. Chandler gained 104 yards on the ground on 18 attempts.
Howell's touchdown runs covered 30 and 11 yards, both times pinballing off Miami defenders.
"A couple of times he just ran through arms and twisted and went in to score," Brown said.
Miami nearly erased an 18-point deficit, pulling within 38-34 before stalling in North Carolina territory early in the fourth quarter. Then the Tar Heels drove 58 yards for a touchdown, aided by 30 yards on Miami penalties.
"Those are the breaks that are tough to stomach for a team that is battling like ours," Diaz said.
Miami used Tyler Van Dyke, who made his third career starter and first away from home, at quarterback just days after it was announced that D'Eriq King would be lost to season-ending shoulder surgery.
Van Dyke, who was 5 for 15 and picked off twice in the first half, finished 20 for 45 with 264 yards with a touchdown and three interceptions.
Van Dyke's numbers weren't overwhelming, but Diaz said his impact was huge.
"Everything that was thrown at him," Diaz said. "The way he fought back and led us at the end."
Van Dyke's fourth-quarter efforts were why Diaz was intent on aiming for a touchdown rather than a potential tying field goal on the last drive. Van Dyke threw for 104 yards in the fourth quarter.
"I'm putting our confidence in Tyler Van Dyke," Diaz said.
For UNC, Downs has scored on a touchdown reception in every game this season, including the team's first TD on Saturday. He has an eight-game TD streak dating to last season. He made 10 of his 11 receptions in the first half, ending up with 96 yards.
North Carolina has a bye week before traveling to Notre Dame on Oct. 30. Miami is home against No. 22 North Carolina State on Saturday.