Chameera took his first five-wicket bag as New Zealand slumped from 81 without loss in reply to Sri Lanka’s first innings score of 292 to be 232-9 at stumps.
Doug Bracewell was not out 30 after a ninth-wicket stand of 31 with Neil Wagner (17) who was dismissed on the last ball of the day.
The 20-year-old Chameera, bowling at up to 146 kilometres per hour (90.6 mph), was used sparingly by captain Angelo Mathews, taking three for 17 in his first spell and two for 30 in his second.
In partnership with the wily 37-year-old Rangana Herath, playing his 67th Test, they took New Zealand apart when it seemed openers Tom Latham and Martin Guptill were settling in.
New Zealand lost four wickets for eight runs in four overs as Chameera claimed the scalps of Latham, Kane Williamson and Ross Taylor while Herath removed Guptill.
Brendon McCullum tried to steer his side out of trouble and put on 39 for the fifth wicket with Mitchell Santner before he became Herath’s second wicket.
Chameera in his second spell removed Tim Southee and Wagner.
Sri Lanka’s first innings wrapped up quickly on the second day with only 28 further runs added, half of them by top scorer Mathews who was out for 77, caught at third slip by Latham off Southee.
Latham and Guptill made a brisk start for New Zealand as they cruised through to 81, giving New Zealand three consecutive half-century opening stands for the first time in 14 years.
Chameera had been kept out of the attack for most of the partnership but when he came in he was on the money almost immediately, having Latham caught by Dimuth Karunaratne at leg gully for 28.
In his next over he took out New Zealand’s batting kingpin Williamson for one.
Again targeting the leg side, as he did with Latham, Chameera tempted Williamson into a pull shot which was skied to Suranga Lakmal at deep square leg.
Guptill, who had looked solid as he reached 50, escaped the wrath of Chameera only to fall to Herath, playing across the line and getting an edge which was smartly taken by Mathews at first slip.
Chameera completed the four-over rout to have Taylor caught by Dinesh Chandimal without scoring.
McCullum, who put away his natural attacking instincts, was initially given out on 17 off 47 balls when caught by Udara Jayasundera in the deep.
He was called back as he headed off the field as television replays showed Nuwan Pradeep’s delivery was a no ball.
But he failed to make the most of the reprieve with his eventual dismissal coming one run later when he was neatly caught one-handed by Kusal Mendis at short leg.
Santner made 38 and BJ Watling 28 as New Zealand tried to recover but they still ended the day 60 runs behind with only one wicket remaining.