Kane Williamson and Trent Boult dragged New Zealand back into contention against Pakistan on the second day of the first Test.

New Zealand slumped to 153 all out in Abu Dhabi on Friday as Yasir Shah took 3-54 to put the hosts in complete control.

But the Black Caps bounced back on day two with Boult recording fine figures of 4-54 as Pakistan were bowled out for 227 in reply.

Captain Williamson (27) and opener Jeet Raval (26) then led New Zealand to stumps, called early due to bad light, on 56-1 after Tom Latham departed first ball, leaving the tourists 18 runs behind with nine wickets remaining.

Pakistan resumed on 59-2 but lost Haris Sohail (38) and Azhar Ali (22) in consecutive overs, the latter becoming Boult's second victim as New Zealand battled back.

Asad Shafiq hit five fours and a maximum in his 43 as an 83-run partnership with the watchful Babar Azam (62) took Pakistan into the lead.

Boult removed both batsmen to spark a fightback for the Black Caps, Ajaz Patel (2-64) chipping in with the wickets of skipper Sarfraz Ahmed (2) and Bilal Asif (11).

Pakistan lost their last five wickets for just 53 runs as they failed to build a dominant platform but Mickey Arthur's men made an early breakthrough in the field.

Hasan Ali's first ball sent Latham's off stump cartwheeling for a golden duck, with Williamson and Raval rebuilding by sharing a 56-run stand to steer New Zealand through to the close.