Kevin Pietersen enjoyed rare success as a bowler and Stuart Broad took five wickets, as England gave South Africa some anxious moments before the second Test ended in a draw at Headingley on Monday.
The result means South Africa go into the third and final Test at Lord's on August 16 with a 1-0 lead, with England needing to win to prevent South Africa from taking over their number one place in the Test rankings.
South Africa-born Pietersen followed up a thrilling century in the first innings by taking the first three wickets with his occasional off-spin bowling, despite never having taken more than one wicket in an innings in 87 previous Test matches.
Broad then took five wickets in 37 balls before South Africa declared at 258 for nine, leaving England an improbable 253 to win in 39 overs. They made 130 for four before the players agreed to a draw with six overs remaining.
England opened the batting with Pietersen, who hit 149 in the first innings, and the star of the match hit three fours in the first over from Morne Morkel.
But he was caught at mid-on on 12 when he mistimed a drive against Vernon Philander without scoring any further runs.
Alastair Cook and Andrew Strauss tried to keep the scoring rate close to the required rate of almost six-and-a-half runs an over.
But the chase ended after Strauss hit a full toss straight back to off-spinner JP Duminy while on 22, Cook fell to Dale Steyn four short of his half-century and Matt Prior was run out for seven.
Jonathan Trott and Ian Bell batted together for an hour before the players shook hands shortly after 1730 GMT.
An entertaining final afternoon did not seem likely on a rain-hit morning as Jacques Rudolph and Graeme Smith progressed serenely to an opening partnership of 120.
Play was twice interrupted by rain and only 21 overs were bowled, despite lunch being delayed by half an hour.
Pietersen struck with his second ball, trapping Rudolph lbw in the last over before lunch - the second time in the match Pietersen had dismissed Rudolph with his second ball - and followed up in his second over after lunch with Smith's wicket.
It was the start of a hectic afternoon in which 116 runs were scored for six wickets in 27 overs.
While Pietersen prised open the South African batting, also dismissing Hashim Amla, he leaked runs with some loose deliveries.
After he had taken three for 52 in nine overs, captain Strauss took him off and brought back fast bowler Broad.
With his fourth ball Broad trapped AB de Villiers lbw, ending an enterprising innings of 44 off 45 balls.
He won another verdict against JP Duminy off his next ball and followed up with the wickets of Philander and Jacques Kallis before tea and Morkel soon after the interval, as South Africa sought quick runs before declaring.
Broad finished with five for 69, with all his wickets taken for 29 runs in 37 balls.
Although both James Anderson and Stuart Broad produced some hostile deliveries on an overcast morning, Rudolph (69) played some stylish strokes, while captain Smith was solid.
Rudolph, returning to what was his home ground during five years playing for English county Yorkshire, drove fluently to reach his half-century off 92 balls with nine fours.
He also had an all-run four and added another three boundaries in facing another 30 deliveries before his dismissal. Rudolph was opening the batting in place of Alviro Petersen, who batted at number eight after he suffered a hamstring injury while making top score of 182 in the first innings.