Scott Ruscoe scored in the last minute of extra time to win the Loosemores League Cup for The New Saints.
The Saints looked to be cruising when Chris Sharp put them 2-0 ahead with 15 minutes remaining at Aberystwyth.
Llanelli hit back with goals from Chris Holloway and Craig Moses, only for Sharp to score the Saints' third after 85 minutes of an enthralling final.
Jordan Follows equalised a minute later to send the game into extra time, where Ruscoe's strike finally won it.
The victory was slight consolation for the Saints after they were piped to the Welsh Premier League title by Bangor City in the final game of the season on Saturday.