Outside half Mark Cooke gave the students an early lead, but man of the match Josh Lewis picked up try, which he converted, for the visitors, kicked a penalty and openside flanker Dan Thomas rced away for an interception try which gave Llanelli a 15-3 interval lead.
But a dramatic start to the second half by the students, with tries from Jamie Harris and Tim Thompson, saw them level the scores at 15-15 and through the cup tie into the melting pot.
The lead then swapped hands very quickly as Chris Lewis kicked a penalty to put the students ahead before two penalties from Lewis edged Llanelli back ahead at 21-18 with seven minutes left to play.
One final attack from Cardiff Met looked certain to earn them the winning try and a quarter-final place, but some magnificent defensive work from Llanelli managed to keep them at bay.
Principality Premiership leaders Carmarthen Quins swept aside Bridgend Athletic 61-6 at Camarthen Park, scoring nine tries in the process. Ellis LLoyd helped himself to a hat-trick and six others got on the scoresheet in a one-sided affair which saw the Quins safely through to the last eight.
Tondu were dumped out after suffering a heavy home defeat at the hands of Premiership outfit Llandovery. Wyn Jones opened the scoring after just five minutes and Aaron Warren and Jake Randall added first half scores.
James Garland kicked two conversions and Tondu’s Gareth Powell kicked his side’s six points to leave the visitors 19-6 up at half-time. The Premiership side went up a gear in the second half with tries from Rhodri Jones and Richard Brooks. A late brace from Matthew Jacobs gave the Drovers a 45-6 win.
Aberavon avoided an upset at the home of SWALEC Championship side, Narberth. Steph Andrew scored in a tight first half as Narberth kept in touch with two penalties, going into the break 6-7 down.
The Premiership team proved their superiority in the second half as Christopher Davis and Matthews Jenkins made things more comfortable for the Wizards who ran out 19-6 winners.
In the day’s only other all-premiership encounter Cross Keys made it through to the quarter-finals at the expense of Bedwas at Bridge Field. The visitors did the damage early on scoring all four of their tries in an impressive first half display.
Adam Powell, Rhys Dyer, Rhys Jones and James Cordy-Redden secured the bonus point before the interval. Dorian Jones added four penalties giving Cross Keys a 31-3 win and a place in last eight.