Martin picked up 4-91 to become the leading wicket taker in Tests at the Basin Reserve, the venerable Wellington venue which forms the largest traffic roundabout in the southern hemisphere.
His first wicket, that of Azhar Ali, saw him surpass Richard Hadlee's career tally of 53 victims on the ground.
But he was joined - and then temporarily passed - by skipper Daniel Vettori, whose haul of 4-100 moved him to 55.
Martin, however, mopped up the tail to finish one ahead on 56.
"It's temporary, I think," said the 36-year-old. "I think Dan and I will exchange that while I'm around but he'll grab it at the end."
Both Martin and Vettori were denied five-wicket hauls when Tim Southee took the final wicket.
Pakistan, who had been 286-3 at one stage, were all out for 376 - a lead of just 20 on first innings.
And New Zealand openers Martin Guptill (1no) and Brendon McCullum (6no) survived to stumps on day three at 9-0, raising the home side's hopes of a series-levelling victory.