Steven Finn took three wickets to keep England on course for victory in the first Test, but Jonny Bairstow’s missed stumping of AB De Villiers gave South Africa faint hope in Durban.
Finn, a late addition to the touring squad after a foot injury, took out Dean Elgar, Hashim Amla and Faf Du Plessis as the Proteas closed the fourth day on 136 for four, 280 short of an improbable winning mark.
They will have little serious interest in hunting down a record 416 but the presence of master batsman De Villiers at least gives them a chance of surviving three sessions for the draw.
That is where Bairstow comes in.
The Yorkshireman had earlier top-scored with 79 in England’s 326 all out, but not for the first time his glovework will be back under the microscope.
Having dropped Amla earlier in the game, Bairstow got nowhere near to taking the ball cleanly when De Villiers, on 33, found himself stranded off the bowling of Moeen Ali.
Finn restored some of the feel-good feeling by removing Du Plessis late on, but Bairstow will not be content until De Villiers (37no) is back in the pavilion on day five.
Those expecting either the clatter of wickets or the thud of defence were confounded at the start of South Africa’s innings.
After 10 overs, shared between five different bowlers, openers Stiaan van Zyl and Elgar had already wiped 50 off the target amid a slew of boundaries.
But that was as good as it got for the home fans, Van Zyl losing his off stump for the second time in the match just five balls later.
Ben Stokes, despite struggling for fitness, came round the wicket and speared one through the gate to get England on the board.
Three balls later Moeen drew a thick edge from Elgar, but Stokes could not lay a hand on an extremely tough chance.
South Africa’s counter-attack stalled completely after the tea break, with Finn making two major breakthroughs in his second spell.
Home skipper Amla (12) and Elgar (40) both played half-heartedly at balls wide enough to leave and were comfortably held by Bairstow and Joe Root respectively.
Amla’s lean streak has now spanned the entirety of 2015, during which he has just one half-century and an average of 22.81.
That left one of South Africa’s two prize scalps left: De Villiers.
He and Du Plessis combined to see off 17 overs without incident, for the addition of 41 runs, before drama struck.
De Villiers raced down the track and must have feared the worst when the ball bit sharply.
But Bairstow was deceived too and did not come close to taking a clean catch, much less completing the stumping.
He punched the ground in dismay as his team-mates looked on pensively.
Smiles returned to their faces when a Finn lifter took Du Plessis’ edge and was snaffled by Cook, leaving his side firm favourites.
England began the day on 172 for three - a healthy lead of 261 and with plenty of batting to come.
That persuaded them to take a few extra risks, with one eye on the growing target and another on the time left in the match.
In the end they added 154 runs for the loss of seven wickets, with Bairstow responsible for more than half.
While several of his team-mates perished attempting to force the rate, Bairstow settled to the task.
He timed the old ball particularly well against Morne Morkel and was happy to ride his luck against the turning ball, twice offering half-chances in the channel between wicketkeeper and leg-slip.
By lunch Bairstow had reached 49 at exactly a run-per-ball and afterwards added 30 more from 27 deliveries, two of which disappeared for six, before he was last out.
Dane Piedt was the chief beneficiary of the innings, adding the wickets of Stokes (5), James Taylor (42) and Moeen (16) to record a maiden five-for.
It had been six years since a South African spinner last achieved that milestone and 50 since the last off-spinner.
A word too for Root, who reacted to his dismissal for 73 with endearing anger.
That left him with 1,385 Test runs in 2015 - second only to Michael Vaughan’s England record of 1,481 - at an average of 60.21.
But Root has high standards and even higher ambitions and it will gall him to have turned just three of his 13 half-centuries this year into tons.