Andrew Ellis snapped six wickets to help the Canterbury Wizards bowl out the Wellington Firebirds for 239 and gain the upper hand on day one of the Plunket Shield fixture in Rangiora.
However, the home side didn't have it all their own way with a remarkable century stand for the final wicket, including a sparkling half-century from Mark Gillespie, rescuing them from a seemingly hopeless position.
The Canterbury batsmen were required to face 35 overs and managed 91 for two, leaving them just 148 runs behind with eight wickets in hand.
Ellis ran through the top Wellington top and middle order after Edward Nuttall picked up opener Josh Brodie for 20.
Wellington weren't looking too bad at 59 for one but Ellis took three quick wickets to leave the visitors reeling at 83 for five.
His first scalp was former team-mate Michael Papps who made 31 before bowling out Jesse Ryder for a one and finally removing captain Stephen Murdoch for a duck.
The misery was compounded by Willie Lonsdale who cleaned up Luke Woodcock for 18.
Grant Elliott and Luke Ronchi steadied momentarily with a 43 runs partnership for the sixth wicket, taking the score through to 125 for five but it was Ellis again who did the damage.
He picked up Elliott for 26, Ronchi for 17 and Harry Boam first ball to complete a remarkable spell of seam bowling and finish with six for 58.
The visitors further reduced to 126 for nine but a remarkable partnership for the last wicket made sure a respectable total was posted.
Number eleven batsman Gillespie chanced his arm and in doing so successfully pounded 77 off 63 deliveries including four sixes and nine boundaries. He was well supported by McKay who struck the team's second highest score of 33.
Gillespie then removed George Worker for a duck while McKay took the wicket of Shanan Stewart for three.
Peter Fulton (32*) and Dean Brownlie (53*) negotiated the rest of the days play and will resume tomorrow.