Both teams employed the bouncer, angling across batsmen from around the wicket.
It took until the first over after lunch and 21st of the New Zealand innings before Chameera was introduced by captain Angelo Mathews. He had Latham caught by leg slip Dimuth Karunaratne for 28 in his second over. It was the first time a New Zealand pair have produced three consecutive test half-century stands since 2001.
When Williamson followed for one, caught at deep square leg, the crowd was stunned into silence. Chameera's fist pumps almost hit the turf, such was his joy.
Guptill exited moments after making his 15th test 50, slogging across the line off Rangana Herath. Mathews swallowed the deflection at first slip.
"Obviously we're not where we'd like to be," Guptill said. "We had to weather a storm from the Sri Lankan bowlers after lunch, but the fight we showed down the bottom of the order means we're still in the game."
Each of the three opening wickets came from playing across the line. It was also the first time in more than 11 years that the second, third and fourth wicket partnerships failed to produce more than 10 runs at home.
Taylor was Chameera's third victim. A ball angled on middle-and-leg brushed his gloves en-route to wicketkeeper Dinesh Chandimal.
New Zealand's effort was further hindered when captain Brendon McCullum was caught for 18 by silly point Kusal Mendis off Herath. He had enjoyed the benefit of a reprieve when caught at fine leg off Pradeep on 17 at 117-4. McCullum also survived a Sri Lankan lbw review on two when a fine Hot Spot edge came to his rescue.
Chameera's opening spell was 7-3-17-3 but, bizarrely, he was rested for 35 overs before resuming to snare Tim Southee hooking nonchalantly to long leg.
"He came in with a hostile spell and stuck to a plan that worked," Guptill said. "I'm sure they'll use the same policy in the second innings."
It was a shock turnaround by the visitors.
New Zealand appeared locked on auto-pilot at lunch, having taken three wickets for 28 to wrap up Sri Lanka's first innings - that extended to 6-33 on the back of today's late surge.
Southee picked up the key wicket of Mathews for 77, edging to Latham at third slip, and took his test tally to 159, one short of equalling fifth-placed Danny Morrison on New Zealand's all-time list.
Wagner's strategy provided a gauge for Chameera later in the day. He came over the wicket to pitch short of a length on middle-and-leg against Lakmal. Lakmal jabbed one down, which hit the stumps but failed to break the bails, but Wagner induced another prod next ball which flew to Williamson in the gully.
- By Andrew Alderson at Seddon Park
SCOREBOARD
WAGONWHEEL
MANHATTAN