A late flurry from Ben Stokes, who hit an unbeaten 74 off 93 balls, gave England the upper hand on day one of the second Test against South Africa.
On a true Cape Town batting surface, Alex Hales (60), Joe Root (50) and Nick Compton (45) all made starts, but failed to kick on and England slipped to 223-5.
But Stokes flayed the second new ball to take the tourists to 317 without further loss. He shared an unbroken 94-run stand with Jonny Bairstow who was 39 not out at stumps.
Kagiso Rabada, the 20-year-old playing his fourth Test, took 3-74, but South Africa tired in the evening session.
Pace bowler Rabada had earlier characterised a South Africa performance improved on the 241-run first-Test defeat, as the Proteas kept England in check with wickets at important times.
But Stokes capitalised on some poor bowling with the second new ball to move the tourists towards an imposing score on a pitch that looks likely to deteriorate.
Derbyshire CCC Membership for 2016 is on sale. Buy before February 1st Early Bird deadline and SAVE! Purchase online at derbyshireccc.com, in person at The 3aaa County Ground or by calling 0871 350 1870.