Sri Lankan fast bowler Lasith Malinga, middle, signals an lbw in Tuesday's semifinal at R. Premadasa Stadium in Colombo. ((William WestGetty Images))

Sri Lanka qualified for the Cricket World Cup final on Tuesday with a five-wicket victory over a New Zealand team that resisted but never recovered after setting an inadequate target.

New Zealand struggled to put 217 on the board and Sri Lanka overhauled the modest total, thanks to 73 from opener Tillakaratne Dilshan and 54 from captain Kumar Sangakkara — reaching 220-5 in 47.5 overs in the first World Cup semifinal.

Sri Lanka lost four wickets for 25 runs as New Zealand made a fight of it, but Thilan Samaraweera and Angelo Mathews guided the co-hosts home to ensure a final against either India or Pakistan. Fireworks erupted around Colombo's Premadasa Stadium as Sri Lanka scored the last few runs.

Dilshan becomes the World Cup's highest scorer with 467 runs.

Earlier, Muttiah Muralitharan took a wicket with his last delivery on Sri Lankan soil and was carried on the shoulders of his teammates around the field when the game ended. Muralitharan will most likely play in Saturday's final in Mumbai, but this was his last game in Sri Lanka.

Sangakkara, Sri Lanka's captain, paid tribute to the 38-year-old spinner, who took 2-42.

"He's THE icon of Sri Lanka," Sangakkara said. "He's a gentleman on and off the field.

"He's the ultimate team man. You can't ask for any more than that."

As they had done on Saturday in the 10-wicket demolition of England in the quarter-finals, Dilshan and Upur Tharanga got Sri Lanka off to a flying start, with Tharanga scoring a six from the second ball. The pair had reached 40 when Jesse Ryder took a magnificent diving catch — possibly the best of the tournament — at point from the bowling of Tim Southee.

Dilshan and Sangakkara then put on a fluent and aggressive 120 to wrest control of the match. Dilshan hit 10 fours and a six while his captain hit seven fours and a six as the game was taken away from New Zealand, who have now played in six World Cup semifinals but never made it to the final.

"We scrapped pretty hard and gave ourselves a chance, but we just missed out," Vettori said.

Sri Lanka won the 1996 title, the last World Cup staged in Asia, and lost the final of the last edition to Australia.

New Zealand persisted with tight bowling and the run rate slowed. When Dilshan was also caught by Ryder from Southee's bowling, Sri Lanka was still coasting on 160-2, but three more wickets tumbled and suddenly the Sri Lanka crowd was quiet. Southee ended with 3-57.

Samaraweera and Mathews, who batted with a runner after sustaining an abdominal injury while bowling, shared a nervy 35-run partnership to keep alive hopes of a second World Cup title for Sri Lanka.

Paceman Lasith Malinga took three wickets after Vettori won the toss ands batted on a hot, humid afternoon.

Scott Styris was the only New Zealander to stand out as he hit 57 in 77 balls.

The 30,000-strong crowd chanted "Murali, Murali" as the veteran spin bowler delivered his last ball and were sent into ecstasy when he dismissed Styris with it.

New Zealand made a confident start, with openers Martin Guptill and Brendon McCullum hitting the ball sweetly. McCullum struck a huge six to midwicket before falling clean bowled by spinner Rangana Herath attempting the same shot in the eighth over with the total at 32.

Guptill and hard-hitting Jesse Ryder added 37 before Muralitharan struck, inducing some bounce from the placid wicket that was also used for Saturday's quarterfinal victory over England. The bounce surprised Ryder, who had been shaping to cut but only succeeded in top edging to Sangakkara. He scored 19 in 34 balls.

Guptill had also become becalmed by the time he faced a cruel, high-speed yorker from Malinga that shattered the base of his stumps and he was dismissed for 39, scored in 65 balls.

Ross Taylor and Styris then produced the partnership of the innings, putting on 77 in 17.4 overs. Taylor was unusually subdued while the 35-year-old Styris, playing his 188th One-Day International, was the more aggressive, reaching his 50 in 64 balls.

Taylor, whose explosive hitting took New Zealand to victory over Pakistan in the group stage, decided to accelerate the score in the 40th over and immediately fell, caught in the deep by Upul Tharanga from the bowling of spinner Ajantha Mendis from a miscued slog-sweep.

Taylor scored 36 in 55 balls and the last six wickets tumbled for 25 runs as the Black Caps lost their way.