Moeen Ali claimed a hat-trick as England completed a 239-run win to take a 2-1 lead against South Africa going into the final match of the series at Old Trafford on Friday.
Ali finished with figures of 4-45 whilst Toby Roland-Jones returned 3-72 after Dean Elgar completed his eighth test century before he was one of Ali's four victims.
Ali's hat-trick included that of Elgar, who gritted his teeth for 136 from 228 balls, but he was caught by Ben Stokes before Kagiso Rabada and Morné Morkel perished with the next two balls.
It was the same combination that did it for Rabada as he was caught by man-of-the-match Stokes whilst after being given not out, a successful England review sparked wild scenes as Ali celebrated the first ever test hat-trick at The Oval and the first by an England off-spinner since 1938.
Dream debut for Roland-Jones
Roland-Jones' promising debut finished with him claiming eight wickets in the match as he took the crucial wicket of Temba Bavuma, who had looked good for his 32 from 97 balls.
Like Morkel, Bavuma was given not out by umpire Joel Wilson but a successful review by Joe Root showed the ball had struck the pad first and not the bat.
Roland-Jones was on a hat-trick himself after Vernon Philander left a straight one the very next ball and was given out LBW, which proved to be the second of three hat-trick opportunities during the innings after Stokes claimed two wickets in two balls late on day four.
England complete dramatic turnaround from Trent Bridge
Chris Morris was the other man to go on the final day for South Africa as he was caught at slip for a positive 24 with the last ball before lunch by that man Stokes, who finished the match with 143 runs, three wickets and four catches.
Keshav Maharaj was the man left stranded on 24 from just 26 balls as England wrapped up South Africa's second innings in 77.1 overs on day five, bowling the tourists out for 252 to claim a 239-run victory going into the final test.