South Africa lost two wickets after tea but pushed their lead over New Zealand to 211 runs by the close of day three to leave the second test delicately poised in Christchurch on Sunday.
Fiery Black Caps paceman Neil Wagner had Rassie van der Dussen caught and bowled for 45 and Temba Bavuma caught in close for 23 at Hagley Oval, but South Africa dug in to be 140 for five in their second innings at stumps.
Wicketkeeper Kyle Verreynne was 22 not out and all-rounder Wiaan Mulder on 10, the pair having combined for a steadying 36-run partnership to boost the Proteas' chances of batting New Zealand out of the game.
New Zealand made 293 in reply to the Proteas' first innings 364 and then scythed through their top order to restrict South Africa to 42 for three at tea.
Tim Southee trapped opener Sarel Erwee lbw for eight, then had South Africa captain Dean Elgar caught behind for 13.
Matt Henry sent a chill through South Africa late in the middle session as he bowled number three Aiden Markram for 14.
That New Zealand remain in the game is credit to all-rounder Colin de Grandhomme, who held on for a defiant, unbeaten century.
He strolled off with 120 not out, having anchored a 133-run stand with Daryl Mitchell after they came together with their team in peril at 91 for five on day two.
De Grandhomme survived a nervous period in the 90s before hitting spinner Keshav Maharaj for three shortly before lunch to bring up his second test century.
Maharaj finally broke their partnership by trapping Mitchell lbw for 60.
De Grandhomme and Neil Wagner (21) put the pressure back on South Africa with a swashbuckling 38-run partnership until Wagner was caught slogging Kagiso Rabada to fine leg.
Rabada finished with 5-60 to top South Africa's bowling.
New Zealand, who thrashed the Proteas by an innings and 276 runs in the first meeting in Christchurch last week, need only draw the match to claim their first ever series win over the South Africans.
Victory, however, would see the Black Caps dislodge Australia as the world's number one test side, while shoring up their World Test Championship defence with maximum points.