Llanelli pulled off a stunning comeback to dump 10-man Wrexham out of the FAW Premier Cup at Stebonheath.
Chris Holloway's quick brace in extra time ensured they booked their place in the semi-final.
Chris Llewellyn had put Wrexham 2-0 up before Rhys Griffiths pulled one back for the home side.
Griffiths took the game into extra time, scoring from the penalty spot after Steve Evans was sent off for hauling him down on 89 minutes.
It was Llanelli from the Welsh Premier who made the brighter start forcing Gavin Ward in the Wrexham goal into three fine saves.
But they fell behind after 12 minutes when Craig Jones' weak back-pass let in Llewellyn to round keeper Ryan Harrison and tap home.
Llewellyn doubled the lead 11 minutes later before Rhys Griffiths instantly replied after a Mike Williams error.
Llanelli pushed for the equaliser in the second half, but just as Wrexham seemed to be heading for the semi-final, they gave away a penalty.
Evans fell to ground as he challenged Griffiths in the box and grabbed the striker's ankle to bring him down, resulting in the spot-kick and a sending off.
The home side made the most of their extra man and scored twice in three minutes at the start of extra time.
Holloway first headed home Griffiths' cross and then sealed the win after pouncing on a loose ball after Wrexham failed to clear Andrew Mumford's header.