LOUISVILLE, Ky. (AP) -- Brian Brohm threw for 236 yards and two touchdowns and the Louisville defense used a late goalline stand to escape pesky Pittsburgh 24-17 on Saturday.
Brock Bolen added 52 yards rushing and the go-ahead touchdown with 1:54 remaining for Louisville, which needed a late stop from its much-maligned defense to snap a two-game home losing streak.
The Cardinals (5-4, 2-2 Big East) seemed to finally put the Panthers away when Bolen dived over from 1 yard out.
But the Panthers (3-5, 1-2) needed just four plays to drive to the Louisville 1. Running back LeSean McCoy ripped off runs of 19, 19 and seven yards, and Pat Bostick hit Oderick Turner at the Louisville 3.
Turner appeared to twist into the endzone for a touchdown, but a video review showed he was down at the 1.
On first down, McCoy took the handoff and hopped to his left. Louisville linebacker Lamar Myles hit the ball with his right hand, and cornerback Rod Council pounced on it at the Louisville 3. Three straight runs by Brohm ran out the clock.
The fumble ruined a spectacular fourth quarter for McCoy, the nation's top freshman rusher. He gained 65 of his game-high 120 yards in the final frame, including a 7-yard touchdown run that tied the game at 17 with 4:26 to play.
The Cardinals responded by moving 70 yards in eight plays, aided by a pass interference call on the Panthers and a 27-yard pass from Brohm to Scott Kuhn. A facemask penalty on the pass to Kuhn moved the ball to the Pittsburgh 7, and two Bolen runs put the Cardinals back in front.
Still, it was barely enough to keep the Cardinals from blowing a 10-point fourth quarter lead for the second straight week. Louisville led Connecticut 17-7 in the fourth quarter a week ago, only to allow two late touchdowns.
It nearly happened again. But the nation's 89th-ranked defense finally made a play to keep Louisville's flickering hopes of making a bowl game for the 10th straight season alive. The Cardinals finish the season against No. 6 West Virginia, No. 11 South Florida and No. 25 Rutgers.
The late heroics hardly seemed necessary after Louisville built a quick 14-0 lead behind a pair of Brohm touchdown passes. The Cardinals seemed poised for more, moving to the Pitt 41 midway through the second quarter. But a sack and three penalties pushed them back.
The Panthers couldn't do anything after Louisville punted, but seized momentum late in the half thanks to a little trickery.
Aaron Berry picked off Brohm to give the Panthers the ball at the Louisville 27, and the Panthers went deep in the playbook to get within a touchdown.
On first down after the interception, Bostick threw a lateral to tight end Darrell Strong, and Strong pulled up and threw to a wide-open McCoy to bring the Panthers within 14-7.
The Panthers managed just 49 yards of total offense in the half and 270 for the game, the lowest total the Cardinals have allowed this season.
Ole Miss-Mississippi State Postgame Breakdown
Jhurell Pressley run for 75 yds for a TD (Zack Rogers KICK)
Leonard Fournette sets LSU's single-season rushing record
Dak Prescott high-fiving fans at the end of the game on his senior night
Ben Grogan 21 yd FG GOOD
(Two-point Conversion failed )