In the 2011–12 South African summer, De Villiers featured in the home series against Australia and against Sri Lanka. In the latter, he scored a century (160 not out) in South Africa's win in the third and deciding Test of the series. He was named the Player of the Series, having scored 353 runs at an average of 117.66. He then led South Africa for his first series since being appointed captain of the One Day International team. In his first match as captain, South Africa inflicted the heaviest defeat in Sri Lanka's history, with a 258-run win in Paarl on 11 January 2012. It was also the largest margin of victory (by runs) in an ODI match between two Test-playing teams. South Africa went on to win the ODI series, and De Villiers was named player of the series, having scored 329 runs at an average of 109.66, including a century (125 not out) in the fifth and final match in Johannesburg. On 10 July, De Villiers was handed full-time wicket-keeping duties after Mark Boucher announced retirement from cricket after suffering eye injuries from a hit from a bail the day before.