Thilan Samaraweera defied the discomfort of an injured hand and the threat of New Zealand's attack to ensure Sri Lanka retained a foothold in the second Test on Tuesday.
Samaraweera, who had three stitches inserted into the webbing on his right hand on Monday after dropping a catch, scored an unbeaten 76 to help steer the home side very slowly to 225 for 6 by the close of play on the third day.
It meant Sri Lanka still trail by 187 runs following New Zealand's first innings total of 412, but it was a vast improvement on their position midway through the afternoon session when they had slipped to 128 for 6.
Samaraweera, a veteran of 77 Tests stretching back to 2001, was his usual calm and assured self despite his injury, and by the close of play, which came 25.4 overs early because of bad light, had batted for 209 minutes, facing 156 balls and hitting five fours.
The unbeaten innings took his tally at the venue to 597 runs, at an average of 99.50, including two hundreds.
Samaraweera found a willing ally in off-spinner Suraj Randiv as the pair added an unbroken 97 runs for the seventh wicket to frustrate the efforts of Ross Taylor's side to force a victory that would level the two-match series.
Samaraweera and Randiv's partnership was a record for the seventh wicket at the venue - which has staged 17 Tests including Sri Lanka's first against England in 1982 - eclipsing the previous mark of 85 set by Pakistan's Inzamam-ul-Haq and Wasim Akram in 1994.
The Sri Lanka duo defied everything that New Zealand could throw at them with Taylor using six bowlers in an attempt to break the stand.
The visiting side's most successful bowler was Tim Southee (four for 51), who followed up his opening burst of two for 16 on Monday with two more victims.
Resuming at 43 for three, overnight batsmen Tharanga Paranavitana (40) and Angelo Mathews (47) took their partnership to 90 and the total to 102 before Paranavitana, who had resisted for more than three hours, edged Southee to Kruger van Wyk behind the stumps.
That was after Paranavitana was dropped by Taylor at first slip off the luckless Trent Boult (one for 34) when the batsman had scored 32.
There was no such reprieve for Mathews, who became Southee's fourth wicket when Martin Guptill produced a superb diving one-handed catch to his right at second slip.
The other wicket to fall on Tuesday was wicketkeeper Prasanna Jayawardene, playing in his 50th Test, who was dismissed in identical fashion to the first Test in Galle.
He top-edged a sweep off spinner Jeetan Patel to be held at deep backward square-leg by Kane Williamson.
That was New Zealand's last success of a truncated day as Samaraweera and Randiv resisted for 37 overs.
Play during the shortened final session was held up briefly as a cat made its way across the ground.
The first Test of the series in Galle was won by Sri Lanka by 10 wickets inside three days.
New Zealand (1st innings): 412
Sri Lanka (1st innings): (overnight 43-3)
T. Paranavitana c Van Wyk b Southee 40
T. Dilshan b Southee 5
K. Sangakkara c Boult b Southee 0
M. Jayawardene c Williamson b Boult 4
A. Mathews c Guptill b Southee 47
T. Samaraweera not out 76
P. Jayawardene c Williamson b Patel 12
S. Randiv not out 34.
Extras: (lb-3, w-1, nb-3) 7
Total: (six wickets; 86.2 overs) 225
To bat: N. Kulasekara, R. Herath, S. Eranga
Fall of wickets: 1-7, 2-7, 3-12, 4-102, 5-103, 6-128.
Bowling: Southee 19-3-51-4 (1nb), Boult 17-5-34-1 (2nb, 1w), Patel 22-3-47-1, Astle 13-2-41-0, Bracewell 13-1-44-0, Williamson 2.2-1-5-0
Sri Lanka lead the two-match series 1-0.
Photograph: Dinuka Liyanawatte/Reuters