Seamer Tim Southee spearheaded a great fightback by New Zealand on day two of the first Test against Sri Lanka to leave the match fascinatingly poised on Sunday.
Southee's four for 46 was crucial in helping to restrict the home side to a first-innings lead of 26 as they were bowled out for 247.
Although New Zealand then lost Brendon McCullum (13) in their second innings, they were still able to close on 35 for one -- a lead of nine.
Southee started the day with a burst of three for 18 from seven overs and with Trent Boult (two for 46) at the other end providing excellent support, Sri Lanka were reduced to 50 for five having resumed at nine for one. The Kiwis made 221 first up.
"We were disappointed with our batting in the first innings and we knew the bowlers had to step up to get us back into the game," Southee told reporters.
"The bowlers did an outstanding job and we have grabbed the game back and now I hope we can put up a decent total."
The fact Sri Lanka were able to secure a lead was due almost entirely to an outstanding partnership of 156 for the sixth wicket between captain Mahela Jayawardene (91) and his deputy Angelo Mathews (79).
Jayawardene, who became the second player after former New Zealand captain Stephen Fleming to top 1,000 runs in Tests between the two sides, hit 11 fours and a six during a stay of 176 balls.
He was eventually dismissed gloving an attempted sweep off spinner Jeetan Patel (three for 55), well caught by the tumbling Kruger van Wyk behind the stumps.
LOOSE DRIVE
It was the sixth time Jayawardene has been dismissed in the 90s in Tests but he still had the satisfaction of extending his remarkable record at Galle, where he has scored 2,284 of his 10,631 Test runs.
Mathews faced 154 balls and hit 12 fours and a six before edging a loose drive to become James Franklin's first Test wicket since April 2009.
The sixth wicket stand occupied 49 overs and was in stark contrast to the chaos of the first hour of proceedings when wickets tumbled at regular intervals.
Southee struck with the third ball of the day when he dismissed Tharanga Paranavitana, bowled off the inside edge for a duck.
The bowler then had nightwatchman Suraj Randiv (9) caught by Martin Guptill at second slip the delivery after McCullum dropped a regulation edge at third slip.
Left-armer Boult then joined in by dismissing Kumar Sangakkara (5), who edged a perfectly pitched away-swinger to McCullum in the slips as the home side tumbled to 20 for four.
Thilan Samaraweera (17) and Jayawardene tried to see off Boult and Southee's onslaught but Samaraweera was eventually dismissed leg before wicket to Southee, offering no shot to a ball that seamed back into the right-hander.
Once Mathews was dismissed the innings subsided meekly with the final five wickets falling for 41 runs.
"We were hoping for a bigger lead but you can't be greedy after being 20 for four and 50 for five," said Sri Lanka coach Graham Ford.
"Credit to the New Zealand bowlers, they bowled fantastically well up front and it was a tough day for our batsmen.
"We looked like being a long way behind but a fantastic partnership between Mahela and Angelo got us right back into the game."
Scorecard:
New Zealand first innings 221
Sri Lanka first innings
Paranavitana b Southee 0
Karunaratne lbw b Southee 0
Randiv c Guptill b Southee 9
Sangakkara c McCullum b Boult 5
M.Jayawardene c van Wyk b Patel 91
Samaraweera lbw b Southee 17
Mathews c van Wyk b Franklin 79
P.Jayawardene c Bracewell b Patel 4
Kulasekara c & b Patel 8
Herath not out 11
Eranga c Bracewell b Boult 4
Extras (b-9, lb-8, nb-2) 19
Total (all out, 80.2 overs) 247
Fall of wickets: 1-2, 2-9, 3-18, 4-20, 5-50, 6-206, 7-215, 8-229, 9-242
Bowling: Boult 16.2-3-46-2 (nb-2), Southee 18-4-46-4, Bracewell 16-1-67-0, Franklin 7-2-16-1, Patel 23-7-55-3.
New Zealand second innings
Guptill not out 13
McCullum c Kulasekara b Herath 13
Williamson not out 9
Total: (1 wicket, 10 overs) 35
Fall of wickets: 1-18
Bowling: Kulasekara 4-0-17-0, Eranga 1-0-4-0, Herath 4-0-13-1, Randiv 1-0-1-0.
Photograph: Dinuka Liyanawatte/Reuters
Herath thrives again in Galle as New Zealand struggle
Sri Lanka name rookie spinner for NZ Test series
New Zealand seek Muralitharan help on Sri Lanka tour
Jimenez proves age no factor in Hong Kong victory
Dilshan hits ton to lead SL to big win over NZ