Kane Williamson scored a record-equalling century as New Zealand moved into a strong position in the third Test against South Africa in Hamilton.
The Black Caps skipper struck his 17th Test ton to move level with Martin Crowe for the most Test centuries for New Zealand.
Williamson was in impressive form at Seddon Park, finishing day three unbeaten on 148 to guide his team to 321-4, a lead of seven runs.
He was ably supported by opener Jeet Raval, who again fell short of a maiden Test hundred after being dismissed for 88.
The tourists struggled on a relatively flat pitch, but three wickets in the final session helped them stay in the Test as they look to protect their 1-0 lead in the final match of the series.
Morne Morkel (2-74) and Kagiso Rabada (2-83) did the damage, with New Zealand losing three wickets for 20 runs late on Monday.
They eventually resumed at 67-0 after heavy overnight rain led to a delayed start, with Tom Latham and Raval picking up where they left off a day prior.
Latham brought up a much-needed half century but fell soon after, Quinton de Kock taking a good catch down low to his left to see Morkel grab his 250th Test wicket.
Williamson and Raval took control after that, the former doing the bulk of the scoring.
The captain smashed Vernon Philander (0-59) for six to bring up 5,000 Test runs – the fastest Kiwi to reach the mark as he eclipsed Crowe by seven innings.
A ball change led to frustrations from South Africa, who had been roughing it up with one-bounce throws, with Philander at one stage rolling it back from the outfield, seemingly as a form of protest.
Williamson and Raval put on 77 during the middle session before the former brought up his ton with a boundary off Dean Elgar, who bowled one forgettable over which went for 13.
Raval, earlier dropped after giving Faf du Plessis a tough chance, then survived a review, South Africa trying their luck in the 80th over before they got two more.
As Williamson dominated, Raval fell short of a century as De Kock took another great catch after an inside edge from the opener.
Neil Broom (12) and Henry Nicholls fell in successive balls to Rabada while Mitchell Santner was bowled by Philander, only for a no-ball to be called as he made it to stumps alongside Williamson with the hosts in the lead.