New Zealand have reached 440-6 at stumps on day three of the first Test against Pakistan in Karachi.
The visitors lead by two runs after Pakistan were dismissed for 438 in their first innings.
Williamson was the star of the show with the bat on the third day after scoring a well-deserved century. This was his 25th Test ton and fifth against Pakistan in the longest format of the game.
Williamson and Ish Sodhi were unbeaten on 105 and one, respectively, at the close of play.
Abrar Ahmed was the pick of the bowlers for Pakistan, claiming three wickets, meanwhile Nauman Ali bagged two.
Earlier, the home side claimed two wickets in the second session of the day with spinners Abrar Ahmed and Nauman Ali bagging a scalp each.
Henry Nicholls was cleaned up by Nauman after scoring 22 runs, meanwhile Abrar sent Daryl Mitchell, 42 off 47, back to hut.
New Zealand lost two wickets in the morning session after resuming their first innings on 165-0.
Tom Latham was sent back to the hut by Abrar Ahmed but not before scoring a brilliant century. The left-hander notched up 113 runs with the help of 10 fours.
Meanwhile, Devon Conway fell eight runs short of his ton after he was trapped before the stumps by Nauman Ali.
Latham and Conway added an impressive 183 runs for the first wicket to provide a solid platform to their side.
Pakistan were dismissed for 438 in their first innings of the opening Test against New Zealand in Karachi on Tuesday.
Babar Azam, 161, and Agha Salman, 103, scored centuries for the hosts.
Salman was the last Pakistan player to be dismissed but not before scoring his maiden ton in the longest format of the game. He was the star of the show on the second day of the match after skipper Azam was dismissed, without adding to his overnight score, in the first over of the day.
Salman’s 155-ball 103 included 17 fours. He added 54 crucial runs for the seventh wicket with Nauman Ali, who played a gritty knock of seven runs in 75 balls.
The visitors were in a position to dismiss Pakistan for less than 400 but Salman added 63 runs for the final two wickets, with the tailenders, to frustrate the Kiwis.
Tim Southee claimed three wickets, meanwhile Ish Sodhi, Michael Bracewell and Ajax Patel bagged two scalps each.