Shakeel was unbeaten on 124 and Abrar Ahmed yet to score after New Zealand took four wickets in the final session for 70 runs, leaving the hosts 42 runs shy of the tourists’ first innings total of 449.
Shakeel has kept his end intact for 488 minutes — batting all day on Wednesday, and adding 83 for the fourth wicket with Imamul Haq (83) and 150 for the fifth with Sarfaraz Ahmed (78).
But New Zealand spinner Ajaz Patel dismissed Agha Salman (41) and Hasan Ali (four) as Pakistan slumped from 385-5 to 397-9, losing four wickets for just 12 runs off 27 balls.
Leg-spinner Ish Sodhi took two wickets in as many balls, dismissing Naseem Shah for four and and Mir Hamza without scoring before last-man Ahmed saw out the day.
Shakeel, who has hit 17 boundaries, was lucky to get a life off pacer Tim Southee when Tom Latham grassed a simple catch at short cover when the batter was on 102.
With wickets falling at the other end, Shakeel went into a shell, scoring just 23 runs in the final session.
He completed his century before tea when he swept spinner Michael Bracewell for a boundary and then took a sharp single to reach three figures in 319 minutes of stoic batting.
Sarfaraz was stumped on 78 in the penultimate over before the break, having scored his third consecutive half-century of the series.
Earlier, Haq was snapped-up by wicketkeeper Tom Blundell off fast-bowler Southee after Pakistan resumed on 154-3.
On 74 overnight, Haq rebuilt the innings after being involved in skipper Babar Azam’s run-out on Tuesday, but fell in the second hour of the session.
He edged a drive to Blundell, but was only given out after New Zealand challenged the turned-down appeal. Haq hit 10 boundaries and a six in his 244-minute knock.
The two-match series is tied after the first Test — also in Karachi — ended in a draw.