A sensational double century from Darren Bravo ensured the West Indies remain in with a chance of avoiding defeat against New Zealand in Dunedin.
The tourists had looked down and out after they were forced to follow on chasing New Zealand's hefty 609-9 declared, with the West Indies losing two second-innings wickets late on day three.
However, led by Bravo's brilliant rearguard action, the Windies managed to reach stumps on day four on 443-6 for a lead of 47 runs.
The 24-year-old finished unbeaten on 210 - passing his previous Test best of 195 - with his 404-ball knock including 30 boundaries.
Having resumed on 168-2 following on, still 228 shy of making their hosts bat again, the day certainly did not start in positive fashion for the Windies as Marlon Samuels was caught and bowled by Tim Southee in the fourth over of the morning.
When Shivnarine Chanderpaul was trapped leg before by Neil Wagner soon after to leave his side 185-4 it appeared his side could roll over.
But Narsingh Deonarine announced his arrival at the crease with a sweet boundary off Wagner and he proved an able ally to Bravo, who brought up his ton off his 200th delivery with a sweep for four off Ish Sodhi.
By lunch the pair had compiled 50 runs in a conservative but effective partnership, and they continued in similar fashion after the resumption.
Deonarine was given a let-off, though, thanks to a drop from Brendon McCullum - and he added insult to injury by cracking another boundary.
Bravo stroked back-to-back fours off Wagner, before Deonarine drove to the boundary to pass 50, but he was out two overs later, caught behind off Corey Anderson to end a partnership of 122.
Hopes that the dismissal would spark a collapse failed to materialise as Denesh Ramdin shared a 56-run stand for the sixth wicket with Bravo.
Ramdin was finally bowled by Sodhi's googly for 24 - only for Darren Sammy to provide some lower order fireworks to move the tourists into the lead.
Sammy scored 44 not out off 75 balls, including four boundaries and two sixes, during an unbroken 76-run stand with Bravo for the seventh wicket.