After 120 minutes of goalless action, it went to the spot, and it was Bafana Bafana who held their nerve, as Ronwen Williams produced four sensational saves to inspire his side to a 2-1 shootout victory, setting up an AFCON last-four clash with Nigeria.
Cape Verde went first in the shootout but saw their first three spot-kicks saved in almost identical fashion, with Bebe, Willy Semedo and Laros Duarte all denied by the inspired Williams.
South Africa were not nerveless themselves, as Zakhele Lepasa blasted over the bar and Aubrey Modiba then saw his penalty saved by Vozinha.
But Mothobi Mvala dispatched his with minimum fuss, piling the pressure on Patrick Andrade. He had to score to keep Cape Verde in the shootout, a task that proved beyond him as Williams' capped a heroic performance to send South Africa into the AFCON semi-finals for the first time since 2000.
There had been little in the way of clear-cut chances in 90 minutes, until Benchimol found himself clean through on goal in stoppage-time. He had just the goalkeeper to beat, but Williams, in a sign of things to come, stuck out a hand and tipped the ball onto the woodwork.
Vozinha kept South Africa at bay at the other end of the pitch early in extra-time, keeping out efforts from Mihlali Mayambela and Evidence Makgopa with two superb saves in a matter of seconds as the match opened up.
Bebe continued his familiar trick of shooting at every possible opportunity, with seemingly no regard for distance or angle, much to the increasing frustration of his team-mates. Cape Verde's big threat came through Benchimol, who was presented with two more good chances and dragged both well wide.
That ensured the match went to the spot, where South Africa, 28 years to the day since their one and only AFCON triumph, kept their hopes of doubling that tally alive.