From the very get-go, it was captain Stokes who once again proved his inspirational all-round qualities, following up his fine century on day two with a long spell of bloody-minded brilliance with ball in hand.
Fourth-wicket pair Keegan Petersen and Rassive van der Dussen had successfully sucked the heat out of England after a strong start from the hosts, blocking their way in a determined stand of 87 in 261 balls.
With inspiration in short supply, it fell to Stokes to break their will as he removed the pair in quick succession to end their 43-over rearguard.
His decisive moment came in the middle of a draining 14-over stint either side of the tea break, as flogged himself for the cause and came up trumps.
With his work done he tossed the new ball to James Anderson and Ollie Robinson, who finished things off in a blaze of glory by taking the last five wickets for just seven runs in the space of just 30 deliveries.
Robinson, on his comeback appearance after seven months away, pocketed figures of four for 43, while Anderson picked up three for 30.
The 40-year-old's haul saw him surpass Australia's Glenn McGrath as international cricket's most prolific fast bowler across all formats, taking his combined tally to a remarkable 951.