LEXINGTON, Ky. (AP)Mike Wright ran 59 yards for a touchdown and completed an 8-yard touchdown pass to Will Sheppard with 32 seconds left for a 24-21 win over Kentucky Saturday, snapping a 26-game Southeastern Conference losing streak.

Wright was named the Commodores’ starting quarterback to start the season but was benched following a 45-25 loss to Wake Forest September 10, Freshman AJ Swann started the last six games but was ruled out against Kentucky due to an injury.

”You got a bunch of guys that are fighting,” Vanderbilt coach Clark Lea said. ”We’re building a program, and building a program’s hard. It takes people that are aligned, doing the right things the right way. And that’s what these guys are doing. I’m glad they got rewarded today.”

Wright ran for 126 yards and a touchdown, and threw for 184 yards and another touchdown. Ray Davis added 126 yards rushing and a touchdown for the Commodores.

”There’s going to be a lot to clean up, but we like to learn from wins,” Lea said. ”I’m proud of Mike. Mike’s had a tough year, personally a tough year. But he’s fought through that and stayed with his teammates and prepared every week. He’s made some big plays for us this season. He came out with a big run at the end to connect with Will Sheperd and I thought he did some really nice things to keep us in the game early.”

Kentucky (6-4, 3-4) appeared to have survived the Vandy effort after Chris Rodriguez twice gave the Wildcats a lead, scoring from the 5 for a 15-14 lead, then racing 72 yards for a touchdown to make it 21-17 with 5:03 left in the game.

Vandy’s game-winning drive appeared stalled, but Octavious Oxendine’s personal foul wiped out a Tyrell Ajian interception. Given new life, Wright completed a 40-yard pass to Quincy Skinner Jr. to the Kentucky 9 on fourth-and-11 to set up the winning score.

”You give them credit,” Kentucky coach Mark Stoops said. ”I have been there. I know how hard they’ve worked. It’s a good moment for them. It’s hard for me to put my finger on (one) thing. Disappointed with the way things have gone. I think everyone is. For whatever reason I’m not getting it done with this team.”

Vanderbilt’s last conference win was Oct. 19, 2019 over Missouri 21-14.

THE TAKEAWAY

Vanderbilt: The Commodores defense, which had given up a conference-worst 36.8 points per game, was stellar outside of the two touchdown scores. The ended up with four sacks and six tackles for loss to go with an interception on the final play of the game. CJ Taylor led the ‘Dores defense with six tackles, a sack and the interception. That pressure allowed a Vanderbilt defense surrendering 314 yards a game passing to hold Will Levis to just 109 yards on 11-of-23 completions.

Kentucky: The Wildcats’ inability to get touchdowns in the red zone in the first half led to the 7-6 halftime deficit. Twice Kentucky drove inside Vandy’s 20 and another time inside the 30 to come away with just two field goals of 47 and 27 yards and blocked field goal from 37 yards. The second field goal completed a 66-yard, 15-play drive that stalled at the Vanderbilt 9.

DEJ� VU

This is the not the first time Kentucky has been the team Vandy has beaten to snap a long losing streak. Back in 2003, Vanderbilt beat Kentucky 28-17 at home on Nov. 15 behind four touchdown passes from Jay Cutler to snap a 23-game losing streak.

UP NEXT

Vanderbilt closes out the season with two home games, starting with Florida Saturday.

Kentucky continues its three-game home stand to end the season, hosting No. 1 Georgia Saturday.

More AP college football: https://apnews.com/hub/college-football and https://twitter.com/ap-top25. Sign up for the AP’s college football newsletter: https://tinyurl.com/mrxhe6f2