
All-rounder Stokes, fresh from a hundred in England's 239-run victory in the third Test at The Oval, was leading host’s revival with the bat.
But fast-bowler Rabada struck with the new ball in the penultimate over of the day when a full-length delivery, which surprised Stokes, smashed into the base of the stumps and bowled the left-handed batsman for 58.
Du Plessis return gives South Africa hope
Rabada, banned from the second Test for swearing at Stokes in the series opener, yelled in joy.
He finished the day with figures of two for 52 in 18 overs, but the worth of South Africa's efforts as they seek a win that would see them end the series all square at 2-2 will only become fully apparent when they bat.
Jonny Bairstow, who might have fallen for four, was 33 not-out and nightwatchman Toby Roland-Jones unbeaten on nought at the close.
All of South Africa's frontline bowlers in an attack missing injured pacemen Vernon Philander and Chris Morris, both ruled out with lower back strains, took wickets on Friday.
Ali hat-trick sees England thrash South Africa
Fast bowler Morne Morkel deserved better than figures of one for 58 in 19 overs, while left-arm spinner Keshav Maharaj kept things tight in a return of one for 54 in 29 overs.
Meawhile Duanne Olivier, recalled along with batsman Theunis de Bruyn, took two for 72 in 19 overs including having England captain Joe Root lbw for 52.
"The boys will be happy with the performance today," paceman Olivier told Sky Sports. "When Root missed that delivery, I knew it was going to hit the stumps. There was no doubt in my mind. If we can do the basics right, we can disrupt England."
Paul Farbrace, the England assistant coach, accepted it had been a tough day for the hosts.
"Morne Morkel was outstanding and Maharaj has bowled with real control," he said, adding: "I think we battled well."
COMMENTS
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ