Resuming on 120, AB de Villiers scored an unbeaten 278 as the Proteas declared their first innings on 584/9 in the second Test against Pakistan in Abu Dhabi in 2010.