LEXINGTON, Ky. (AP) -- With one perfectly thrown pass, Andre Woodson erased years of agony against Brian Brohm and turned Kentucky's border battle with Louisville into a real rivalry again.
Woodson threw a 57-yard touchdown pass to Steve Johnson with 28 seconds left, and Kentucky shocked the No. 9 Cardinals 40-34 Saturday night.
It was the Wildcats' first victory over a top-10 team in three decades -- since they beat Penn State in 1977 -- and halted Kentucky's four-year losing streak to Louisville (2-1). It also ended Woodson's even longer skid against Brohm, a nemesis since high school.
"Finally the right team won," Kentucky coach Rich Brooks said. "It had more twists and turns than a Dickens novel."
Kentucky (3-0) was about to lose its fifth in a row to its in-state rival after being pushed back because of a personal foul penalty. Then Johnson zipped past the Cardinals' secondary and Woodson nailed him in stride.
"The only thing going through my head is, 'Stevie, please catch the ball," Woodson said. "Once he caught it, I knew."
Woodson completed 30 of 44 passes for 275 yards and four TDs as he beat Brohm, a rival dating to high school, for the first time. The two are among the nation's top quarterback prospects, so if they meet again, it could be in the NFL.
"What a great throw," Kentucky tight end Jacob Tamme said. "It had to be done, and he did it."
Johnson called Woodson a "big-time player."
Brohm showed he was big-time, too. He was 28-for-43 for 366 yards and two TDs and he led a late drive that put the Cardinals in position to win.
But his last-second desperation attempt was deflected and caught by Harry Douglas at the 10, but the receiver couldn't get into the end zone and time expired.
Douglas had a career-high 13 catches for 223 yards, his sixth straight game topping 100 yards.
Kentucky was ahead 33-28 with 6 minutes left when Brohm began an 84-yard drive that ended in Anthony Allen's 2-yard plunge. It was the second touchdown for Allen, who had 96 yards rushing.
"We did give them quite a bit of time to go down and score," Brohm said. "They made a play and did a great job. We gave them too many opportunities."
Woodson went another game without throwing an interception, extending his streak of passes without one to 257. That broke the Southeastern Conference record set by Georgia's David Greene in 2004 and is 14 short of Trent Dilfer's NCAA mark.
Louisville's offensive line was one of only three in the country that didn't allow a sack through the first two games, but Kentucky got to Brohm three times.
Kentucky would have had a fourth sack, halting Brohm deep in his own territory, but a 15-yard personal foul penalty on Wildcats cornerback Trevard Lindley negated that and gave Brohm another chance. He took advantage, firing a 42-yarder to Douglas, who later scored from 3 yards out.
Brohm led the Cardinals down the field on their next possession, setting up a 10-yard run by Allen that put them in front for the first time, 21-19.
Woodson answered during the first drive of the second half, leading the Wildcats 78 yards. John Conner scored on a 7-yard slant.
Kentucky barely had a chance to celebrate regaining the lead. Louisville's Trent Guy took the kickoff 100 yards to put the Cardinals back on top.
Guy's third career TD return -- first on a kickoff -- was a makeup play for his mistake in the opening seconds that gave the Wildcats early momentum. He fumbled the opening kick, setting up a Kentucky field goal.
That and an interception by Lindley helped give Kentucky an early 13-0 lead.
"At no point in time was there panic on the sideline," Louisville coach Steve Kragthorpe said.
Brooks said the victory was relief and he would be shocked if the Wildcats don't enter the Top 25 next week.
"We've had our heads slammed too many times in a row," he said. "I think now the rivalry is back."
College football winners, losers from NFL draft early-entry deadline
While Chris Olave's decision to return to school gives Ohio State a boost next season, other teams are going to have to fill big gaps after their stars declared for the NFL draft.
In Joe Biden's White House, sports and politics may retreat to their own corners
As the 46th president, Biden's sentimental view of athletics and his promise to steer the nation away from political division should put him in a position to repair the strained relationship between the White House and much of the sports world.
College football's top 50 games of the 2020 season, 50-26
How could anyone forget the madness of Ball State-WMU? Where does it fall in the top 50 games of the college football season?
Ex-South Carolina QB Ryan Hilinski transferring to Northwestern
Ryan Hilinski, who started South Carolina's final 11 games as a freshman in 2019, announced Tuesday that he is transferring to Northwestern.
Sources: Michigan hiring Dallas Cowboys' Maurice Linguist to be co-DC as part of defensive overhaul
As part of a staff overhaul on defense, Michigan is hiring Dallas Cowboys defensive backs coach Maurice Linguist to be the Wolverines' co-defensive coordinator, sources told ESPN, confirming an AL.com report.
Sources: Alabama's Nick Saban targeting ex-NFL coach Doug Marrone for staff, hopes to finalize deal soon
Alabama coach Nick Saban is looking to add another former NFL coach to his staff, as he hopes to finalize a deal with Doug Marrone to be the Crimson Tide's new offensive line coach, sources told ESPN.