MIAMI — The Louisville Cardinals drew a flag for excessive celebration in the second quarter and another in the third. Against Miami, the displays of jubilation were premature.
Led by Brock Berlin and Devin Hester, the third-ranked Hurricanes erased a 17-point deficit over the final 20 minutes and came from behind twice in the fourth quarter to beat No. 18 Louisville 41-38 Thursday night.
Berlin threw three touchdown passes and directed the winning drive, a 56-yard march capped by Frank Gore's 1-yard run with 49 seconds left.
The touchdown capped a seesaw fourth quarter. Hester scored on a 78-yard punt return to put Miami ahead 34-31, but Louisville regained the lead when freshman backup quarterback Brian Brohm directed an 80-yard touchdown drive.
Stefan LeFors threw three touchdown passes for Louisville before departing with an undisclosed injury in the fourth quarter.
The Cardinals (4-1) had touted the game as perhaps the biggest in school history, and they rose to the occasion. The Hurricanes (5-0) narrowly averted only the second loss in their past 30 games at the Orange Bowl to remain in the race for their sixth national championship since 1983.
Much of the credit belonged to Berlin, the target of boos when Miami fell behind in the first half. He finished 25-of-37 for 308 yards, including a completion on fourth-and-4 to keep the winning drive alive.
Berlin threw touchdown passes of 9 yards to Greg Olsen, 14 yards to Roscoe Parrish and 11 yards to Akieem Jolla. Miami scored on all six possessions in the second half.
But Brohm had the Hurricanes worried until the final play. The game ended with an interception of his Hail Mary pass from midfield, and then a shoving match between the teams.
Louisville used multiple wideouts — sometimes with an empty backfield — to spread out the Hurricanes and kept them guessing, even trying a flea-flicker in the first quarter that fell incomplete. In the open field the Cardinals were fast enough to match Miami's vaunted speed, to the alarm of the crowd of 63,715.
The Hurricanes trailed 24-7 at halftime and 31-14 late in the third quarter. An early goal-line stand suggested the Cardinals meant business, and 24 consecutive points in the first half confirmed it.
LeFors was 17-of-22 for 244 yards. Lionel Gates scored three times and Tiger Jones caught two TD passes for the Cardinals, who totaled 507 yards against a defense that had given up only one touchdown in its first four games.
Gates also took a short snap on a fake punt and ran 39 yards to set up a touchdown.
Berlin directed consecutive scoring drives of 76, 66 and 87 yards in the second half to cut Miami's deficit to 31-24. The Cardinals then committed their first turnover when LeFors fumbled a snap on his final play, setting up Jon Peattie's second field goal to make it 31-27 with 12 minutes left.
When the highly touted Brohm entered the game for the first time, Miami forced a punt. Hester found a seam up the middle to score untouched — his third touchdown on a punt return this season.
That put the Hurricanes ahead 34-31 with 8:11 left. But Brohm rallied the Cardinals, and Gates scored on a 1-yard run with 4:30 to go.
Then it was Hester's turn again. He twice reversed his field on a 34-yard kickoff return to start Miami at the 44. Rhodes dropped a potential interception that might have sealed the win for Louisville, and on fourth-and-4 at the 8 with 1:52 left, Berlin hit Darnell Jenkins for 5 yards and a first down.
Gore scored two plays later.