DUBAI, United Arab Emirates (AP) — Sarfraz Ahmed smashed his third test century of the year in a record last-wicket stand as Pakistan conceded a 10-run first-innings lead to New Zealand in the second test.

Ahmed made a gallant 112, containing 16 boundaries, before he was caught and bowled by New Zealand captain Brendon McCullum on Thursday and Pakistan was bowled out for 393 soon after lunch on the fourth day.

Ahmed farmed the strike in raising Pakistan's best 10th-wicket stand of 81 runs against New Zealand with Rahat Ali (16 not out) in a frustrating 28 overs for the Black Caps.

Tim Southee's (3-67) two quick wickets and had Pakistan reeling at 312-9 before Ahmed took charge and brought Pakistan within touching distance to New Zealand's total of 403.