South Africa reached 460-4 at close on the second day of the second and final Test in Dubai on Thursday.
Opener Graeme Smith was unbeaten on 227 for his 27th Test hundred and AB de Villiers on 157 not out at stumps as South Africa extended their lead to 361 runs with six wickets intact.
The pair has so far added 326 for an unbroken fifth wicket stand -- an all time South African record for this wicket in Tests.
Pakistan were bowled out for 99 in their first innings.
Pakistan lead the two-match series 1-0 after winning last week's first Test by seven wickets in Abu Dhabi.