Cape Town - Temba Bavuma's maiden Test century stole the show on a special day at Newlands on Tuesday.
Bavuma was 102* when captain Hashim Amla somewhat surprisingly declared the South African innings on 627/7 - two runs short of England's first innings total of 629/6.
It was a scenario that seemed highly unlikely when England declared at 14:22 on Sunday.
England were made to bat for just under half an hour before the close, and they will go into Wednesday's final day on 16/0 - 18 runs ahead.
Hashim Amla's defiant double century - the fourth of his Test career - set the tone and was undoubtedly the spine of the Proteas recovery, but by the end of the day Bavuma had stolen the headlines.
The 25-year-old had hit 11 boundaries by the time he got to his half century off 52 balls, and while his scoring rate slowed down substantially after tea, the magic that was to follow made it all worth the wait.
In the 210th over Bavuma, on 96, edged Finn past first slip. The race was on - Moeen Ali at third man scampering around to stop the boundary.
Much to the delight of every South African in the ground, the ball won the race and Bavuma had three figures in a moment that was as special as they come.
A fist pump towards the dressing room followed, and Bavuma had made history by becoming the first black South African to score a century for the Proteas.
England felt that they were right back in the driver's seat just after lunch, when a lethal new ball spell had seen James Anderson and Stuart Broad take three Proteas wickets for just five runs.
With Chris Morris and Bavuma both at the wicket on 0, South Africa were still 180 runs behind at that stage and England would have backed themselves to get one more and expose the lower order.
But either side of that period of wicket-taking frenzy, the day belonged firmly to the home side.
Amla and Du Plessis had batted through the entire first session before they were removed - Amla eventually perishing for 201 while Du Plessis fell five balls later for 86.
Quinton de Kock (5) did not last - out pulling a short ball ball from Broad straight to Anderson at square leg.
What followed, though, was entertainment of the highest order and a partnership that rescued this Test match for South Africa.
Bavuma and Morris raced to their 50 partnership in 48 balls.
Morris, meanwhile, got to his 50 on Test debut off 86 balls.
England had their chances.
Amla benefited from poor catching on 76, 120, 197 and 210 while Bavuma and Morris were also given a dose of good fortune in the final session.
Bavuma was dropped by wicketkeeper Jonny Bairstow when he was on 77, while Morris was put down by Joe Root at slip when he was on 58.
Morris was dismissed for 69, driving a fullish delivery from Steven Finn to Root at cover, and that brought the curtain down on a remarkable seventh-wicket partnership of 166 of 242.
When the declaration came, the stadium was still buzzing after Bavuma's hundred, and few would have been expecting it.
With 13 wickets having fallen in four days of cricket, any result other than a draw seems unlikely.