|T20 Blast, Somerset v Glamorgan|
|Glamorgan 183-6 (20 overs): Selman 66; C Overton 2-35|
|Somerset 182-6 (20 overs): Myburgh 87, Wagg 2-20|
Glamorgan pipped Somerset by one run in a dramatic finish to earn a last-eight place for the third time in four years.
Johann Myburgh's 87 put the home side in the driving seat chasing 184, before Marchant de Lange bowled him and then conceded just six in the last over.
Glamorgan's 183-6 owed much to T20 rookie Nick Selman, who hit 66 off 42 balls.
Aneurin Donald (33), Colin Ingram (35) and Graham Wagg (28 not out) played valuable cameos.
Surrey's victory over Sussex meant that Glamorgan can finish no worse than fourth place.
But Glamorgan were pushed all the way by a fighting Somerset performance, with Myburgh's 87 off 51 balls putting Somerset in the driving seat.
De Lange's double strike, running out Jim Allenby before yorking Myburgh, dragged the visitors back into contention, but the South African paceman still needed to keep his cool in the final over.
He conceded two singles off the first five balls, with Peter Trego's four off the final delivery not quite enough to save Somerset, who remain in with a chance of a quarter-final place if they beat Hampshire at Southampton on Friday, 18 August.
Glamorgan fast bowler Marchant de Lange told BBC Wales Sport: "I was disappointed with my first two overs and you're always under pressure as a bowler then, but I like my death bowling - it's a good challenge especially in situations like today.
"In this situation I was really pleased, the wickets (in the 18th over) were important because it's a dot ball and it brings the flow of the game to a standstill, especially with a class player like Myburgh. It was important to get him out."