Williamson was unbeaten on 111 at the break, having joined injured team mate Ross Taylor in second place on the all-time list for test centuries for New Zealand behind Martin Crowe, who scored 17.
Wicketkeeper BJ Watling, who had a lbw decision overturned on review, was on 20 as the pair chipped away at South Africa’s first innings tally of 308 with an unbroken 54-run partnership.
New Zealand could effectively be six down, though, with Taylor undergoing scans on Friday on the injured right calf which forced him to retire hurt on Thursday.
New Zealand Cricket said the 33-year-old had a low grade tear and may bat again if required, although it was too early to determine the long-term prognosis.
The hosts were also unlucky to have allrounder Jimmy Neesham dismissed in controversial circumstances when he nicked a Morne Morkel delivery through to wicketkeeper Quinton de Kock while on seven.
Television replays showed that none of Morkel’s foot was grounded behind the line, indicating a no ball.
Third umpire Rod Tucker, however, ruled that as Morkel’s heel, which was in the air, was behind the line when the front of his foot touched the ground, the delivery was fair.
Williamson had resumed on 78 and took almost an hour to add to his overnight score as South Africa’s pace bowlers toiled away on a pitch that offered them little assistance but had begun to provide inconsistent bounce and turn for the spinners.
The 26-year-old, however, buckled down and brought up his century on the 195th delivery he faced when he swept a full toss from off-spinner JP Duminy to fine leg for a single.
Paceman Vernon Philander managed to get rid of nightwatchman Jeetan Patel for 16 before Neesham’s controversial dismissal.
(Reporting by Greg Stutchbury; Editing by Nick Mulvenney)
NewsCO World & Australian News, Sport, MMA & More