The undefeated season was slipping away, and so was any realistic chance Miami had of getting into the College Football Playoff and competing for a national championship.

That is, until seven seconds changed everything.

Just like that, a 14-point deficit was gone — and perfection remains within the Hurricanes’ reach.

Malik Rosier threw three touchdown passes and ran for another score, and No. 2 Miami pulled off its biggest comeback in five years by holding off Virginia 44-28 on Saturday to extend the nation’s longest winning streak to 15 games.

“It’s amazing, this train we’re riding right now,” linebacker Shaquille Quarterman said. “We just want to keep it going.”

Jaquan Johnson had an interception return for a touchdown for Miami (10-0, 7-0 Atlantic Coast Conference, No. 3 CFP), which scored the game’s last 30 points. The Hurricanes twice climbed out of two-touchdown-deep holes, snapped a 15-game losing streak in games where it faced deficits of 14 points or more and finished off their first 7-0 home regular-season record since 1988.

“This team believes,” offensive lineman KC McDermott said. “This team believes in our goal and the way we’re going to attack it.”

Kurt Benkert was brilliant for Virginia (6-5, 3-4), completing 28 of 37 passes for 384 yards and four touchdowns.

The game started at noon, and it wasn’t until 2:21 p.m. that Benkert took aim at a receiver and missed. He started 18 for 19 for 288 yards and four touchdowns in a little over a half, the only incompletion in that span being an intentional one — he threw the ball away to avoid what would have been a sack by Miami’s Chad Thomas.

Benkert’s 20th throw wasn’t incomplete, technically. It was just to the wrong team.

Johnson’s fourth interception of the season became a 30-yard return for a score. It was Miami’s second touchdown in seven seconds after Lawrence Cager hauled in a 9-yard scoring pass from Rosier, a 28-14 Virginia lead was gone — and the Hurricanes left no doubt the rest of the way. Rosier and Travis Homer had touchdown runs in the final 4:03 to close it out for Miami.

“I like the way my team played,” Virginia coach Bronco Mendenhall said. “We were well prepared, played hard. We had plenty of chances to stage the upset. Came up short.”

Homer rushed for 96 yards for Miami, which looks to close out a perfect ACC regular-season slate at Pittsburgh on Friday. The Hurricanes already had a spot in the ACC championship game against Clemson on Dec. 2 secured.

Benkert threw long touchdown passes on two of the Cavaliers’ first three possessions — a 33-yarder to Olamide Zaccheaus and 75-yarder to Joe Reed made it 14-0 quickly.

But again, the Turnover Chain sparked Miami.

Down 14-7 in the second quarter, Homer recovered a punt that Virginia muffed — making him the first offensive player to wear Miami’s famed piece of jewelry. He barely had the bling on before the Hurricanes tied it on a 36-yard TD catch by Dayall Harris.

“They are very beatable,” Reed said. “The chain is what gives them the spark. I think without the chain they’d be a whole different defense.”

No one has beaten them yet, and Miami took Virginia’s best shot.

Virginia got a spectacular grab from Andre Levrone with 33 seconds left in the half to take the lead back, and restored the 14-point cushion early in the third — cashing in on a blocked punt when Daniel Hamm became Benkert’s fourth TD pass recipient.

And then it all changed. Virginia scored 28 points in the first 32-1/2 minutes, then zero the rest of the way.

“I really felt until the end we had a chance,” Benkert said.

THE TAKEAWAY

Virginia: The Cavaliers could not run the football, finishing with 55 yards on 28 carries — and their longest was a 23-yard scamper by Jordan Ellis as time expired. The Cavaliers got two touchdowns in their first three possessions, then only two TDs in their next 12.

Miami: A hangover of sorts was expected after a pair of prime-time, raucous-environment wins against Virginia Tech and Notre Dame, and Miami awoke just in time. Rosier was 15 of 28 for 210 yards, improving to 11-0 as Miami’s starter.

POLL IMPLICATIONS

The CFP committee had Miami in its top three in the most recent ranking. Now the Hurricanes will have to wait and wonder if the committee will penalize Miami for a slow start.

MOVING UP

Benkert moved up three spots to No. 3 on the Cavaliers’ all-time passing list and is closing in on their single-season record. Matt Schaub threw for 2,976 yards in 2002; Benkert is now within 99 yards of that mark. Benkert also has 25 TD passes this season, three shy of Schaub’s school record.

UP NEXT

Virginia: Hosts Virginia Tech on Friday.

Miami: Visits Pittsburgh on Friday.