Debutant off-spinner Will Somerville took two wickets off successive balls to bring New Zealand within sight of a series-clinching victory as Pakistan slumped to 55-5 in the third and final Test in Abu Dhabi on Friday.
Somerville dismissed Haris Sohail (9) with the third ball of his first over and then had Asad Shafiq caught off the next to leave Pakistan tottering at lunch on the fifth day, chasing a 280-run target.
New Zealand now need another five wickets in the remaining 58.2 overs to clinch the series, their first away series win against Pakistan since 1969.
The series is currently tied at 1-1.
Hafeez had announced he will retire from Tests after this match.
Medium pacer Colin de Grandhomme had first-innings centurion Azhar Ali caught behind for five before Somerville's double strike pushed Pakistan to the brink. Somerville has figures of 2-4 in two overs.
Leg-spinner Yasir Shah finished with 4-129, 29 wickets in the series.
(This story has not been edited by Business Standard staff and is auto-generated from a syndicated feed.)