RALEIGH, North Carolina (Ticker) -- Brock Berlin found it easy to solve the nation's top-ranked defense.
Berlin matched a school record with five touchdown passes as No. 3 Miami defeated Atlantic Coast Conference foe North Carolina State, 45-31, to remain unbeaten.
Berlin completed 15-of-30 passes for 265 yards without an interception for the Hurricanes (6-0, 3-0 ACC), who gained 416 yards. The Wolfpack had been yielding just 203.8 per contest, including just 97.5 through the air, also the best mark in the nation.
The much-maligned Berlin, who improved to 16-2 as a starter with the Hurricanes, matched the school record for TDs in a game set by Bernie Kosar vs. Cincinnati in 1984 and matched by Steve Walsh against the Bearcats in 1988 and Ken Dorsey vs. Boston College in 2000.
Miami trailed, 17-14, before Quadtrine Hill ran 27 yards on a fake punt to the Wolfpack 16, setting up Berlin's second TD pass, a 10-yarder to Sinorice Moss with 10:18 left in the first half.
Richard Washington fumbled the ensuing kickoff, and Berlin capitalized on the next play, finding Roscoe Parrish for a 27-yard score to open a 28-17 cushion.
After a 27-yard field goal by Jon Peattie, Berlin connected on TD passes to Hill and Lance Leggett to make it 45-17 with 13:21 remaining.
Jay Davis completed 20-of-38 passes for 260 yards, four TDs and an interception for the Wolfpack (4-3, 3-2), who are 3-7-1 all time against Miami. T.A. McLendon ran 22 times for 145 yards and Washington had six catches for 111 yards and two scores.
Miami's Devin Hester, who already had three punt-return TDs this season, returned the opening kickoff 100 yards for a score. The Wolfpack countered on a 17-yard TD from Davis to Washington, then took a 10-7 lead on a 39-yard field goal by John Deraney with 8:29 left in the opening quarter.
The Hurricanes grabbed a 14-10 lead on a three-yard pass from Berlin to Parrish three minutes later before the Wolfpack took their final lead, 17-14, on an 18-yard pass from Davis to Tramain Hall early in the second.