Leg-spinner Yasir Shah followed his extraordinary first innings performance with a six wicket haul as Pakistan beat New Zealand by an innings and 16 runs in the second Test in Dubai on Tuesday to level the series 1-1.

The 32-year-old, who took 8/41 on Monday, had figures of 6/143 in the second innings for a match haul of 14/184.

New Zealand – following-on after being dismissed for 90 in the first innings – were bowled out for 312 soon after tea on the fourth day. “I came to know yesterday (about Imran Khan’s record) so it’s an honour that my name will come with him,” said Yasir.

“I haven’t bowled as well as this, especially with the pitch offering turn and bounce like it did. We wanted to put the disappointment of the first Test behind us and set up the series.”

Yasir’s figures are the second best match return ever for Pakistan in Test cricket, bettered only by former captain and current prime minister Imran Khan who took 14-116 against Sri Lanka in Lahore in 1982.

They are also the best by a Pakistani bowler against New Zealand, beating Waqar Younis’s 12-130 in Faisalabad in 1990.

Medium-pacer Hasan Ali was also at his best, taking 3/46 as Pakistan gained a measure of revenge for losing the first Test by four runs in Abu Dhabi last week. Resuming on 131/2 and needing a further 197 to make Pakistan bat again, the New Zealand batsmen, led by Ross Taylor (82), Henry Nicholls (77) and Tom Latham (50), dug in to make things tough for the Pakistani bowlers.

Taylor smashed Hasan’s first ball of the day to the cover boundary to reach his 29th half century in Tests, a welcome return to form having scored just 21 runs in the three innings of this series.

Latham completed his 15th Test fifty but was dismissed the following ball, a little edge behind off Hasan, television umpire Ian Gould confirming that Sarfraz Ahmed had taken the catch cleanly.

Harry Nicholls came to the crease and set about frustrating the Pakistan bowlers, adding 52 with Taylor for the fourth wicket and 57 with BJ Watling for the fifth.

Taylor tried to take the attack to the bowlers, hitting seven boundaries and a six in his 82 but grew impatient after being tied down. An attempted sweep off Bilal Asif ended in a top edge that looped to deep backward square leg where Yasir took a comfortable catch.

Yasir trapped Watling leg before for 27 to end another frustrating the stand and get into the Kiwi tail. De Grandhomme made just 14 and Sodhi was bowled behind his legs for four, unwisely trying to sweep Yasir from well outside off-stump.

Nicholls stood firm amid the wreckage, striking Bilal Asif for a straight six, before Yasir nipped one between bat and pad to bowl him for 77.

It was a brave stand from Nicholls but as skipper Kane Williamson later admitted, the damage had been done in the first innings when New Zealand lost all 10 wickets for just 40 runs in 14 overs.

“We batted better in the second innings,” said Williamson. “But that session yesterday, Yasir put us under tremendous pressure and put the ball in the right areas and got us for 90. That low first innings total was always a factor.”

The end came swiftly as Yasir picked up the last two wickets in the space of four balls, Neil Wagner caught at midwicket – another man trying to sweep – and Trent Boult feathering an outside edge to Sarfraz behind the stumps. The third and final Test starts in Abu Dhabi from Monday.