New Zealand have taken control of the second Test against Sri Lanka, reducing the hosts to 43-3 after achieving a first-innings total of 412 on day two in Colombo.
Resuming on 212-2, Ross Taylor was eventually removed for 142 as the tourists added another 200 runs for the remaining eight wickets to their total.
Sri Lanka made a slow start in their first innings with Tim Southee claiming the wickets of Tillakaratne Dilshan and Kumar Sangakkara while captain Mahela Jayawardene fell for four runs, leaving the hosts 369 runs behind with seven wickets remaining.
Kane Williamson, who had already added more than 200 for the third wicket with Taylor by the time play ended on Sunday, needed nearly seven overs to get the five runs he needed to join his partner on three figures, doing so with an edge through third man.
Taylor perished via an ill-advised sweep shot off Rangana Herath, ending the partnership at 262. Williamson cracked two fours off Tillakaratne Dilshan, but he departed the next over in similar fashion, again the sweep shot proving a poor choice.
Kruger van Wyk was then bowled by Dilshan for a duck to complete a good morning for the hosts. Herath continued where he left off after lunch, trapping debutant Todd Astle (3) plumb in front in his second over of the afternoon session with the batsman not offering a shot.
Daniel Flynn and Doug Bracewell shared a 46-run stand for the seventh wicket before the latter, on 24, heaved a Suraj Randiv delivery straight to Herath at deep mid-wicket.
After resisting for a while, Tim Southee was tempted into going for a big hit off Herath but got nowhere near the pitch off the ball, which went on to hit the top of his stumps. Flynn added three more runs in the evening session as Herath claimed two more wickets to finish with figures of 6-103.
The spinner trapped Flynn for 53 playing back to a delivery that pitched outside off and turned in, and then removed Trent Boult (1) - bowled between bat and pads - to wrap up the New Zealand innings. Jeetan Patel finished unbeaten on 25.
Sri Lanka's reply got off to a shaky start when Southee snared both Dilshan and his replacement Sangakkara in the third over. Jayawardene did not last much longer, edging a full delivery from Boult straight to Williamson at gully having contributed four runs to the total.
That left Sri Lanka reeling on 12-3, and prompted the decision to send Mathews up the order. Mathews and Tharanga Paranavitana ensured the Black Caps' bowlers had no further joy in the evening session.