|Second Test, Cape Town (day three):|
|Pakistan 177 (Olivier 4-48) & 294 (Shafiq 88, Rabada 4-61, Steyn 4-85)|
|South Africa 431: Du Plessis 103|
|South Africa need 41 to win|
South Africa need only 41 runs to win the series against Pakistan after dominating day three of the second Test in Cape Town.
Pakistan slipped from 194-3 to 294 all out in their second innings.
Dale Steyn took 4-85 to move level with Sir Richard Hadlee on 431 Test wickets – 10th on the all-time list – and Kagiso Rabada 4-61.
South Africa, who lead 1-0 in the three-match series, earlier converted their overnight 382-6 to 431.
Asad Shafiq made 88 and Babar Azam helped Pakistan avoid an innings defeat with 72 before he was ninth out.
South Africa thought they had bowled Pakistan out for 278 when Mohammad Abbas skied to mid-off, but replays showed Vernon Philander had bowled a no-ball.
Wicketkeeper Quinton de Kock, who had run off the pitch to prepare to open the batting for South Africa, had to return.
The third Test in Johannesburg begins on Friday, before the teams plays five one-day internationals and three Twenty20, from 19 January to 6 February.