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.
It must be noted that Azam knocked a fighting hundred and the recalled Sarfaraz Ahmed hit a half century to guide Pakistan to a healthy 317-5 on the opening day.
The pair led Pakistan´s recovery from 110-4 during a 196-run fifth wicket stand, as the home team lost only Sarfaraz in the last two sessions.
New Zealand spinners had taken three early wickets on a spin-assisting National Stadium pitch and one before lunch but had to wait until the closing moments when Ajaz Patel got Sarfaraz caught in the slip for 86.
At close, Azam was unbeaten on 161 and Agha Salman three as the home team looked to lift from last week´s 3-0 loss at the hands of England, their first ever whitewash at home.
Azam now has 1,170 runs in nine Tests this year — the highest run scorer in Tests in 2022.
He also beat Mohammad Yousuf´s 2006 aggregate of 2,435 in all three formats, taking 2,584 runs across the board this year.