Marlon Samuels played one big shot too many and opened the way for a West Indian collapse on the fourth day of the third and final Test against South Africa at Newlands on Monday.
The West Indies collapsed from 182 for three to 215 all out, losing seven wickets for 33 runs in 15 overs.
South Africa were left needing 124 to win. They were nine for one at the close after Alviro Petersen was bowled by Suleiman Benn in the last over of an extended afternoon's play, following a lengthy rain delay.
Samuels made 74, sharing partnerships of 68 with Leon Johnson (44) and Shivnarine Chanderpaul (50) before holing out to long-on against off-spinner Simon Harmer.
Samuels, who said after making a century in the second Test in Port Elizabeth that he didn't like to be dominated by spin bowlers, was highly aggressive against the debutant Harmer.
He faced 150 balls in making his 74 but hit 46 off 47 deliveries from the off-spinner. The assault included two sixes, one of them over a fielder at long-on.
But South African captain Hashim Amla persisted with Harmer, who switched ends. Samuels went down the pitch and hit the ball high towards long-on. The ball held up just enough into the wind for Dean Elgar to make a good running catch close to the boundary.
The breakthrough achieved, Amla brought back Dale Steyn, who produced a superb spell of fast reverse swing bowling. He bowled Jermaine Blackwood with a ball which swung in and then straightened to hit the off stump, and had Denesh Ramdin caught at square leg.
Harmer picked up two more wickets, with Jason Holder chipping to midwicket and Jerome Taylor hitting recklessly to deep midwicket.
Steyn had Benn caught behind and Chanderpaul was run out by a direct hit from Temba Bavuma at backward point to complete a disastrous late afternoon for the tourists on a day when rain threatened to prevent any play.
Rain fell from early morning and continued until after lunch. But the weather cleared and play resumed at 3pm South African time, with a potential 53 overs to be bowled, all in one session. As it was, play stretched until 7pm.
Steyn finished with three for 75, while Harmer completed a highly successful debut with four for 82. Both bowlers had match figures of seven for 153.