AP photo by Mark Humphrey / Jazmine Massengill (3), who played at Chattanooga's Hamilton Heights Christian Academy, celebrates after helping lead Kentucky to a 64-62 win against South Carolina in the SEC tournament title game Sunday at Bridgestone Arena in Nashville.

NASHVILLE — The Kentucky Wildcats came to the Southeastern Conference women's basketball tournament needing a great run to ensure they would be one of the 68 teams in the NCAA bracket when it's revealed on March 13.

Thanks to four wins in as many days, their March Madness berth is secure — as SEC tournament champions.

"Nope! We are not on the bubble," second-year Kentucky coach Kyra Elzy said. "We have our ticket punched! We are going!"

Dre'una Edwards hit a 3-pointer from the top of the key with 4.2 seconds left, and the seventh-seeded Wildcats rallied from 15 points down to upset top-ranked and top-seeded South Carolina 64-62 on Sunday at Bridgestone Arena.

Kentucky won the SEC tournament, which was first held in 1980, for the second time in program history. Until this year, the Wildcats had reached the league final four other times — all from 2010 to 2014 — but had not won it since beating Tennessee 80-74 in Lexington in 1982.

The Wildcats set up their winning play out of a timeout with 11 seconds left. The plan was simple: Pass the ball to the open player, then catch and shoot. South Carolina tried to foul but couldn't in time.

"I had to let it fly," said Edwards, a 6-foot-2 redshirt junior forward who scored 12 of her game-high 27 points in the fourth quarter.

Elzy started running up the sideline as soon Edwards' shot went up, knowing it was good. Kentucky senior Rhyne Howard watched as the ball went through the air and compared it to a moment in the movies.

"We knew it was game," Howard said. "We knew we just won."

some text
AP photo by Mark Humphrey / Former Bradley Central High School standout Rhyne Howard, right, and fellow Kentucky senior Blair Green celebrate after the Wildcats beat South Carolina to win the SEC tournament Sunday at Bridgestone Arena in Nashville.

Howard, expected to be one of the top picks in this year's WNBA draft, is from Cleveland, Tennessee, and the Bradley Central High School graduate was joined by two other former stars from the Chattanooga area's prep scene in helping the Wildcats on their four-day run in Nashville.

Howard contributed 18 points, four rebounds and two each in assists, blocks and steals while playing all 40 minutes on Sunday, when former Hamilton Heights standouts Jazmine Massengill and Treasure Hunt were also in the starting lineup. Massengill had seven points, six assists, three rebounds and a steal in 34 minutes, while Hunt added five points, three assists and a rebound in 20 minutes.

The Wildcats (19-11) won for the 10th straight game, with this the biggest yet after knocking off sixth-ranked, second-seeded LSU on Friday and 18th-ranked, third-seeded Tennessee on Saturday to meet up with South Carolina (29-2), which was in the title game for the seventh time in eight seasons and had never been beaten in the final.

It marks a dramatic turnaround for a program that started SEC play 2-8 — with Elzy suspending Edwards for four games — only to become the first to knock off this tournament's top three seeds to win the title. Kentucky is the first No. 7 seed to win, with ninth-seeded Auburn in 1997 the only lower seed to become SEC champion.

The Wildcats not only snapped South Carolina's 18-game winning streak this season, they also ended the regular-season champs' bid for a third straight SEC tournament title.

"Hats off to Kentucky," said South Carolina coach Dawn Staley, whose team should still go to the NCAA tourney as the No. 1 overall seed. "They're hot. They're streaking. We've been on both sides, this side and the other side, and super happy for Kyra and her program and their ability to weather some storms early on and find themselves as our SEC tournament champions."

South Carolina led 45-30 with 4:45 left in the third quarter, seemingly minutes away from cutting down the nets again, but the Gamecocks didn't score after Aliyah Boston's jumper with 5:04 remaining put them up 62-53.

"I didn't really feel like we took our foot off the gas in the fourth quarter," Boston said. "I think we were playing, and they just found different ways to score."

some text
AP photo by Mark Humphrey / South Carolina's Bree Hall drives between Kentucky's Jazmine Massengill, left, and Treasure Hunt, right, in the second half of the SEC tournament title game Sunday at Bridgestone Arena in Nashville. Hunt and Massengill prepped at Chattanooga's Hamilton Heights Christian Academy.

The Wildcats closed on an 11-0 run. Howard lost the ball with no foul called when she went down in the lane with 18.3 seconds left, giving the ball back to South Carolina. Zia Cooke missed both free throws with 16.4 seconds left to set up the final sequence.

After Kentucky took the lead, Destanni Henderson threw up the ball from just past midcourt and hit just right of the rim, setting off a wild celebration by Kentucky.

Boston posted her 24th straight double-double with 21 points and 11 rebounds, and Cooke finished with 15 points.

South Carolina led 21-18 after the first quarter and 30-21 at halftime after holding Kentucky to three points in the second quarter. The Gamecocks were up 55-43 at the end of the third.