AB de Villiers posted South Africa's highest individual score to give them firm control of the second Test on the second day against Pakistan at the Sheikh Zayed Stadium on Sunday.
De Villiers scored 278 not out to pass Graeme Smith's landmark of 277 against England in Birmingham in 2003, with captain Smith declaring their first innings closed on 584 for nine shortly afterwards.
Taufeeq Umar (16) and Azhar Ali (34) then took Pakistan to 59 for one before bad light stopped play and stumps were drawn with seven overs remaining in the day.
Mohammad Hafeez was the batsman out, playing across his front pad and being trapped lbw for two in the first over of the innings.
De Villiers came to the wicket with the score a parlous 33 for three on the first morning but immediately looked settled and occupied the crease for more than 11 hours, taking 418 deliveries and hitting 23 fours and six sixes.
South Africa had begun the second day on 311 for five and De Villiers showed excellent management of the lower order as he shared stands of 73 with Mark Boucher (45), 42 with Johan Botha (12), 59 with Steyn (27) and 35 with Paul Harris (19).
The 26-year-old De Villiers reached the record in a thrilling final hour of the innings, when he and last man Morne Morkel (35 not out) added a record 107 runs in 13.4 overs.
South Africa's previous best 10th-wicket stand was made in 1929 when Harold "Tuppy" Owen-Smith and Alexander "Sandy" Bell added 103 against England in Leeds.
Pace bowler Tanvir Ahmed, playing in his first Test, was the best of the Pakistan bowlers with six for 120 in 27 overs.
De Villiers, who had a reputation for impetuous strokeplay in his youth, batted with composure and maturity, before tearing into the bowling in the hour before tea.
De Villiers, whose double century was the second of this career, and Jacques Kallis (105) had added 179 for the fourth wicket on the first day.
The first Test in the two-match series was drawn in Dubai last week.
South Africa first innings
G Smith c Akmal b Tanvir Ahmed 10
A Petersen c Misbah ul-Haq b Tanvir Ahmed 2
H Amla c Akmal b Tanvir Ahmed 4
J Kallis b Tanvir Ahmed 105
AB de Villiers not out 278
Ashwell Prince c Shafiq b Hafeez 32
M Boucher b Tanvir Ahmed 45
J Botha b Abdur Rehman 12
D Steyn Mohammad Hafeez b Abdur Rehman 27
P Harris c Adnan Akmal b Tanvir Ahmed 19
M Morkel not out 35
Extras: 15 (b 6, lb 1, w 2, nb 6)
Total: 584 (9 wickets dec; 153 overs)
Fall of wickets: 1-2, 2-6, 3-33, 4-212, 5-268, 6-341, 7-383, 8-442, 9-477
Bowling: Umar Gul 36-6-137-0 (nb-1, w-1), Tanvir Ahmed 28-6-120-6 (nb-4, w-1), Mohammed Sami 24-1-101-0, Younis Khan 3-1-11-0 (nb-1), Abdur Rehman 50-9-150-2, Mohammad Hafeez 12-0-58-1.
Pakistan first innings
Mohammad Hafeez lbw b Steyn 2
Taufeeq Umar not out 16
Azhar Ali not out 34
Extras: 7 (b 5, w 1, nb 1)
Total: 59 (1 wicket; 18 overs)
Fall of wicket: 1-2
Bowling: D Steyn 7-0-27-1 (w-1), M Morkel 7-3-15-0 (nb-1), J Kallis 4-1-12-0.