MIAMI (AP) -- What doomed the Wolfpack most, however, was giving Stephen Morris time and Phillip Dorsett room on Miami's final offensive play.
Morris set school and Atlantic Coast Conference records with 566 passing yards, the last 62 of them coming on a touchdown strike to Dorsett with 19 seconds remaining, as the Hurricanes won in wild fashion for the second straight week by beating N.C. State 44-37.
The Wolfpack finished with six turnovers, their most since 2007.
"If you think it was crazy watching, it was definitely crazy while you're in it," said Wolfpack running back Tony Creecy, who finished with a game-high 120 rushing yards on 19 attempts and scored a touchdown. "You can't win with four, five, six fumbles. We kind of lost the game ourselves on all the fumbles. Miami played well but we beat ourselves."
The biggest difference was turnovers: Miami had only one.
"In 38 years, I've never been involved with a team that made so many mistakes," Wolfpack coach Tom O'Brien said. "And that goes back to me."
Morris finished 26-of-49 passing, and on an 87-degree afternoon when players from both sides were succumbing to cramps, he had the strength to have his last throw to Dorsett sail 62 yards on the fly, saving the Hurricanes after they wasted a 16-point first-quarter lead and a 10-point cushion in the fourth.
"People dream about it," Morris said. "But it's kind of crazy when you're actually in the moment. I'm speechless about it."
Miami coach Al Golden was even more succinct. "Holy (bleep)," he said, as the room broke into laughter. "I'm sorry. I'm so tired, I'm delusional."
On a day like this, that could be understood.
The teams combined for 56 first downs and 1,315 yards of offense. Miami had two players top the 100-yard receiving mark last week in its comeback against Georgia Tech; this week, the Hurricanes had two guys reach 180 yards, with Dorsett catching seven passes for 191 yards and Rashawn Scott six for 180. Miami kicker Jake Wieclaw missed three field goals, one a 19-yard chip shot. N.C. State kicker Niklas Sade missed an extra point -- the snap was blamed -- but connected on a 50-yarder to tie the game with 1:58 left.
"Big plays killed us. Missed opportunities killed us," N.C. State's Brandan Bishop said. "That was the most poor performance I've ever been a part of here."
It's the first three-game winning streak since 2009 for the Hurricanes (4-1, 3-0), who go to Chicago to play unbeaten Notre Dame next weekend. N.C. State (3-2, 0-1) saw its three-game win streak end.
Miami's winning play went like this: Morris took the snap and faked a handoff, then watched as unblocked N.C. State linebacker Rickey Dowdy charged at him. Morris faked going one way and made Dowdy miss, then took off to his right and waited to see someone downfield.
That someone was Dorsett, who caught the ball around the N.C. State 7, collected himself after stumbling slightly and got into the end zone.
"Just an amazing play," Dorsett said.
Mike Glennon completed 24 of 42 passes for 440 yards and four touchdowns for N.C. State, but his interception with 48 seconds left -- there was apparently a miscommunication between him and receiver Tobias Palmer, who "zigged when Mike thought he was going to zag," O'Brien said -- helped set up Miami's winning score.
Bryan Underwood caught two touchdown passes for the Wolfpack.
"We just stopped ourselves," Glennon said. "It wasn't about them. It was about us."
It was wild, back-and-forth football throughout, and the fireworks started early.
Miami scored 23 points in a span of 4 minutes, 12 seconds in the first quarter -- its second straight game with a 23-0 run, matching the way it ended last week's overtime win at Georgia Tech. Morris connected with Scott on a 52-yard pass to set up Miami's first touchdown, a 13-yard throw to Allen Hurns, who made a spectacular tiptoe catch at the side of the end zone to knot the game at 7-all.
The Hurricanes got a safety on their next possession, their second in as many games, and things started rolling. Morris and Hurns hooked up for 40 yards on the ensuing drive, capped by Morris finding Dorsett for a 24-yard touchdown. After a three-and-out by the Wolfpack, Morris and Scott connected again, this time on a 76-yard scoring play for a 23-7 lead.
N.C. State fumbled the ball away on four of its next five possessions -- yet kept fighting back, with Rashard Smith catching a 6-yard TD pass in the fourth, followed by Sade's tying kick.
It wasn't enough.
"It was like we were running in sand," O'Brien said.