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."
Ohio State remained No. 1 in the AP Top 25 and tied a poll record Sunday despite lagging support from voters. Meanwhile, No. 2 TCU and No. 3 Baylor edged forward and No. 4 Michigan State slipped.
Texas cornerback Kris Boyd has apologized for retweeting a Texas A&M fan during halftime of Texas' 50-7 loss to TCU on Saturday.
The Big 12 on Sunday acknowledged an officiating mistake that incorrectly awarded Oklahoma State a first down Saturday and said the officials involved would be disciplined.
Georgia coach Mark Richt says he's sticking with Greyson Lambert, who was just 10-for-24 for 86 yards in a loss to Alabama, as the Bulldogs starting quarterback.
Will Grier threw four touchdown passes to four receivers -- all in the first half -- and No. 25 Florida downed third-ranked Mississippi 38-10 on Saturday night.
Leonard Fournette highlighted his SEC-record third straight 200-yard game with a 75-yard touchdown run, and No. 9 LSU overcame Eastern Michigan 44-22 on Saturday night.