LEXINGTON, Ky. -- Thomas Bernal cranked his first career home run as part of a three-hit, four-RBI night, helping lead No. 22 Kentucky to an 8-3 win against No. 8 Louisville on Tuesday night in front of the fourth-largest crowd in UK history, 3,742, at Cliff Hagan Stadium.

Kentucky (20-9) rallied from a two-run hole after the Cardinals got two in the top of the second. UK evened up the game with two in the bottom of the second, before exploding with a three-run homer from Bernal in the fourth, also getting two runs in the sixth and a two-out, solo homer from freshman JaVon Shelby in the eighth inning.

The win against the eighth-ranked Cardinals gives UK a 5-3 record against top-10 teams to open the year, with UK also owning a series win against South Carolina and wins against Virginia and at Vanderbilt. In the UK head coach Gary Henderson era, the Wildcats – which entered the game with the NCAA’s No. 4 RPI – have 20 wins against top-10 teams.

The Wildcats now own a 68-36-1 all-time record against Louisville, including a 33-14 lead in games played in Lexington. UK will be going for its first sweep in the series since 2011 when the Wildcats make a return trip to the Cardinals on April 15.

Bernal and Shelby provided the sparks for the Wildcats at the plate, with Bernal equaling his career high with a 3-for-4 game with a career-best four RBI.

“He has played a bunch this year, but you are right he doesn't play all the time,” Henderson said about the impact of Bernal on the club. “It takes a good attitude. It takes all the things that your mom and dad try to teach you as a kid: have a good attitude, try really hard and be nice to other people. They are basics and he does them well. He is a kid that appreciates what he is a part of and the kids respect him. He is a hard worker and a good player, which is a pretty good combination for us.”

Shelby went 2-for-2 with three RBI, also drawing two walks. UK got hits from Micheal Thomas, Kyle Barrett, Max Kuhn and Matt Reida, with Storm Wilson getting hit by a three-ball pitch and scoring a run, also adding two sacrifice bunts.

UK starter Dylan Dwyer (2-1) worked 5.2 innings, allowing seven hits and two runs, walking two and striking out three.

Dwyer was replaced an out shy of his second career quality start by freshman right-hander Zack Brown, who got a right-handed hitter out to end the sixth inning. Brown allowed a leadoff single and hit a batter to start the seventh, with the run later scoring, before lefty Logan Salow replaced him to face the top of the order. Salow got an out and issued a walk, with right-hander Spencer Jack coming on in relief in the seventh to strand two runners and get two outs. Jack worked the final 2.2 innings, allowing just an intentional walk to reach base, striking out three for his second save of the year.

UK went the first 22 games of the 2014 season without recording a save, but a combination of Jack, Salow and Kyle Cody have saved each of UK’s past four wins.

Louisville (21-7) left-handed starter Josh Rogers (0-1) worked four innings, allowing five hits and five runs, walking two and striking out one. He was replaced by southpaw Drew Harrington to start the fifth inning, with Harrington working one inning, allowing three hits and two runs, striking out one. Jonah Philley and Kyle McGrath each worked in the sixth, with Philley walking a hitter to force in a run. McGrath worked two perfect innings, striking out three. Ryan Lauria came on to work the eighth, allowing a solo homer and striking out one.