(CNN) -- Pakistan earned an important 11-run win over Cricket World Cup co-hosts Sri Lanka in a tense match that went down to the final over on Saturday.
Needing 18 runs from the last six balls for a first victory over Pakistan in seven meetings at the four-yearly tournament, Sri Lanka's challenge ended when big-hitting Nuwan Kulasekara was caught in the deep.
The result put Pakistan top of Group A above defending champions Australia on net run rate.
His swash-buckling 24 off 14 balls faced, including a six off the final ball of the penultimate over, had helped Sri Lanka get into a possible winning position that seemed unlikely earlier in the day-night match in Colombo.
With both teams having won their opening games against minor opposition, Pakistan's batsmen posted a challenging 277-7 from their 50 overs after captain Shahid Afridi won the toss.
Misbah-ul-Haq top-scored with an unbeaten 83 off 93 deliveries as he added 108 for the fourth wicket with veteran Younis Khan, who made a canny 72 off 76 despite hitting only four boundaries.
"That was a big game and the boys knew how big it was, but I think the way Misbah-ul-Haq and Younis Khan played their beautiful innings, it was very mature cricket from those guys," Afridi told reporters in quotes carried by the AFP agency.
"I think the way we played is a message for other teams that we will come harder and harder game by game."
Sri Lanka made a good start in reply as openers Upul Tharanga (33) and Tillakaratne Dilshan (41) put on 76, but Afridi took two wickets and held a catch as the home team slumped to 96-4.
Captain Kumar Sangakkara (49) and Chamara Silva (57) profited from some poor Pakistani fielding to resurrect Sri Lanka's hopes.
But Afridi had Sangakkara and Angelo Matthews (18) caught in the deep by Ahmed Shehzad, then veteran fast bowler Shoaib Akhtar picked up his second wicket as he bowled Thisara Perera to add to his similar dismissal of key batsman Mahela Jayawardene.
Silva was stumped by Kamran Akmal off a wide ball from Abdur Rehman as the wicketkeeper made up for two earlier misses, leaving Sri Lanka needing 45 from four overs.
Kulasekara kept the momentum going, but Rangana Herath could only take one run off the first two balls of Umar Gul's deciding over and the 1996 co-hosts fell to a first home defeat at a World Cup.
"Any defeat is tough but there are quite a few positives to take. I think we bowled pretty well on a flat deck. Unfortunately we lost wickets at the wrong times," Sangakkara said.
Sunday's Group B action will also see two of the tournament's heavyweights in action as co-hosts India take on England in Bangalore.
Both nations won their opening matches, against Bangladesh and the Netherlands respectively.
Meanwhile, the West Indies will be without all-rounder Dwayne Bravo for the rest of the tournament. He was initially ruled out for four weeks with an ankle injury suffered in the defeat by South Africa, but has now returned home.