England's batsmen accelerated after lunch, sacrificing wickets for quick runs as Joe Root delayed the expected declaration to leave the tourists needing to pull off the highest successful run chase in tests if they are to win the match.
In reality, the match will turn on whether England's new captain has left his bowlers enough time to dismiss the tourists and take a 2-1 lead in the four-test series.
Debutant Tom Westley was first to go after lunch, stumped misjudging his advance down the pitch to Keshav Maharaj on 59, his maiden half-century.
Root followed soon after, top-edging a sweep off the same bowler for 50. He has now recorded at least a half-century in nine successive tests.
With the clouds gathering and floodlights on, batting became more difficult. As England pushed on, Dawid Malan was lbw to Chris Morris for 10 before Ben Stokes and Jonny Bairstow struck a quickfire partnership of 49 to take the lead past 400.
Stokes was bowled by Morris for 31 and Moeen Ali was run out following a fine throw from Temba Bavuma for eight as Root delayed the declaration that would have allowed his bowlers to have a crack at South Africa's openers before tea.
Bairstow continued to thrive, scoring a run-a-ball fifty, and reaching 63 before being caught by Kagiso Rabada on the boundary to give Maharaj his third wicket and trigger the declaration. Toby Roland-Jones also struck some heavy blows to finish unbeaten on 23.
West Indies hold the record for highest successful test run chase, scoring 418-7 against Australia in 2003.
England won the first test at Lord's but South Africa tied the series 1-1 by winning at Trent Bridge. The final test is at Old Trafford.