New Zealand clinch five-wicket victory
The morning session was dominated by an outstanding unbeaten century from Kumar Sangakkara (100 from 154 balls) and the bizarre run out of Muttiah Muralitharan as Sri Lanka added 45 runs to their overnight score. Sangakkara's solo effort - by far the best innings of the match - had kicked off on the second afternoon as wickets tumbled all around him. He was just 39 when the eighth wicket fell and thereafter batted with calculated belligerence, intelligently shepherding Lasith Malinga and Muralitharan from the strike.
Malinga played his part, patiently blocking as Sangakkara compiled a 44-run ninth wicket partnership. Some runs went begging with Sangakkara reluctant for Malinga to face more than two balls per over, but, in general, the strategy worked with Sangakkara unleashing some beautiful strokes, including one fierce straight drive and a flamboyant upper cut for six off Shane Bond.
Bond turned out to be the most successful of the bowlers, finishing with 4 for 63 from 19.1 overs, but he was not the menace he was on Friday morning, straining for rhythm. James Franklin, though, broke through after a rain break with a delivery that was slanted across Malinga and just tickled the outside edge (143 for 9).
New Zealand expected Muralitharan to go down guns blazing, but with Sangakkara zeroing in on a remarkable century, the 11th of his career, he calmed his normal aggression and just tried to occupy the crease. He made it hard for himself, falling flat on his back while turning for a second, which ensured he had to face a full Bond over, but somehow managed to survive until Sangakkara glanced a single to bring up his century.
But as Sangakkara started to raise his hands aloft in celebration, Muralitharan had a brainstorm, tapping his bat into the crease and then leaving it again to congratulate Sangakkara while the ball was still live. Brian Jerling, the square leg umpire, motioned to Muralitharan that over had not been called, but it was too late and Brendon McCullum whipped off the bails. Muralitharan may justifiably claim that the dismissal was not within the spirit of the game, but it was within the letter of the law and, for a cricketer of his immense experience, it was a moment of unpardonable madness.
Sri Lanka needed to make early inroads but they were instead left frustrated as Craig Cumming (43) was twice caught off no balls - first when caught at slip on one off Chaminda Vaas and later on 26 off Farveez Maharoof after top edging a pull stroke. Incredibly, he was also caught in the slips off a no ball in the first innings.
Even Muralitharan could not make an immediate impact as he served-up a juicy full toss in his first over that was confidently thumped by Cumming over the square leg fence. But the off spinner persevered and just when Sri Lanka's cause appeared lost, he triggered a mid innings wobble by trapping Jamie How (11) lbw.
Vaas was then called back into the attack and soon accounted for Cumming, who feathered a catch to Prasanna Jayawardene. Stephen Fleming lasted just three balls before being pinned lbw and next over Matthew Sinclair (4) picked out Sangakkara at square leg with a mistimed sweep off Muralitharan. Suddenly, Sri Lanka were back in the game.
However, although Muralitharan - who has now taken 53 wickets in his last five Tests - continued to mesmerise, Astle grabbed back the initiative by taking 11 runs off Malinga's first over of his second spell. Thereafter, Astle and Oram looked to be positive, picking off the runs with increasing ease. By tea, Sri Lankan hopes of a miraculous escape had all but evaporated. There was yet another twist after the break, as Muralitharan trapped Astle lbw in similar fashion to the first innings, before McCullum decided the match should be finished in a hurry, avoiding a pair in style as he lofted Muralitharan for six over extra cover and then hitting the winning runs with a powerful sweep.
In the end, Sri Lanka were left ruing Mahela Jayawardene's decision to bat first and some lacklustre top order batting. New Zealand were left deserving winners having made fewer mistakes throughout the game, but the closeness of the contest ensures that Sri Lanka will still believe they can hit back in the second Test at Wellington.
Charlie Austin is Cricinfo's Sri Lankan correspondent