Kentucky star Rhyne Howard was named SEC tournament MVP. (Matthew Maxey/Icon Sportswire via Getty Images)

No. 7 seed Kentucky stunned No. 1 South Carolina 64-62 on Sunday to win the team’s first SEC tournament championship in 40 years.

The Wildcats, trailing by as many as 15 points during the game, came from behind to defeat South Carolina in Nashville. Dre’una Edwards hit the game-winning 3-pointer with five seconds left to seal the upset win.

Edwards finished the game with a game-high 27 points to go along with nine rebounds and one assist. Rhyne Howard notched 18 points, four rebounds, two assists, two steals and two blocks. The Kentucky senior was named SEC tournament MVP for her performance.

Howard and Edwards helped erase a 12-point South Carolina advantage down the stretch, with Kentucky holding the Gamecocks to just seven points in the fourth quarter. The Wildcats outshot South Carolina 42.1 to 33.3 percent and forced 13 costly South Carolina turnovers.

South Carolina forward Aliyah Boston extended her double-double streak to 24 consecutive games with a team-high 21 points and 11 rebounds.

The Wildcats, who started the season 2-8 in the SEC, became the first team to take down the top three seeds on their way to winning the SEC tournament championship, the program’s first since 1982. Kentucky defeated No. 2 seed LSU and No. 3 seed Tennessee before upsetting South Carolina, officially booking their ticket to the NCAA Tournament.