New Zealand captain Daniel Vettori recorded his highest Test score with a defiant 140 on Sunday but was unable to prevent Sri Lanka winning the second Test by 96 runs to wrap up the series 2-0.
He struck 16 boundaries from 189 balls and added 124 with all-rounder Jacob Oram (56) and a further 69 with number 10 Iain O'Brien (12).
However, New Zealand, who started the day on 182 for six chasing an improbable 494 for victory, were eventually bowled out for 397 in 123.5 overs just before the tea interval.
Left-arm spinner Rangana Herath led the Sri Lanka bowling with veteran Muttiah Muralitharan struggling with a groin injury.
Herath finished with five for 139 from 48 overs in the innings and a match haul of eight for 209.
Muralitharan, who is now a major injury doubt for the two Twenty20 internationals this week, also played his part with three for 85 from 26.2 overs.
Vettori's hundred, the fourth of his career, helped New Zealand set a record for the highest fourth innings score on Sri Lanka soil.
Sri Lanka were expected to wrap up their fourth win in five home tests this summer in the first session but Vettori and Oram held the bowlers at bay in the highest stand of the series for New Zealand.
It turned out to be a frustrating morning for the hosts as several chances were missed, including a sharp slip chance off Vettori that flew to the right of Mahela Jayawardene at second slip.
Dammika Prasad, the bowler who found Vettori's outside edge during a fine spell, was also denied an lbw decision against Oram in his next over.
Herath added to the home team's woes when he dropped a throw at the non-striker's end to squander a clear runout chance.
To make matters worse for Sri Lanka, Muralitharan broke down with suspected groin strain. The off-spinner hobbled off the field in the middle of his 21st over.
However, part-time spinner Tillakaratne Dilshan broke through in the penultimate over of the morning as Oram mistimed a drive to Kumar Sangakkara at short cover.
Oram had scored a diligent 56 from 148 balls with five boundaries, his best score of the series.
Muralitharan did return in the afternoon, despite being visibly troubled by the injury, to bowl a five-over spell that included the wicket of Jeetan Patel (12), who was caught at bat-pad while trying to sweep.