Sri Lanka pulled off a sensational two-wicket win over Pakistan in the fifth and final One Day International in Abu Dhabi.
Sri Lanka chased down a modest 233-run target with two balls to spare, Dinesh Chandimal hitting an unbeaten 64 at Sheikh Zayed Stadium.
For Pakistan, Misbah-ul Haq top-scored with 51 while Mohammad Hafeez and Anwar Ali both made 41. Sri Lankan paceman Lasith Malinga took 4-57.
Malinga and Suranga Lakmal (3-42) starred with the ball as Pakistan were dismissed for 232 after winning the toss and batting first.
Lakmal quickly had Ahmed Shehzad caught at mid-off by Priyanjan for 17 and Malinga removed fellow opener Sharjeel Khan, caught and bowled off a leading edge, for 18.
Malinga had his second victim when he had Sohaib Maqsood caught by Dilshan at point for seven, but Misbah-ul-Haq and Hafeez brought Pakistan back in the contest.
The duo put on 58 before Mathews, who conceded just 26 runs from his 10 overs, grabbed his only wicket of the innings by bowling Hafeez between bat and pad for 41.
Malinga took the key wicket of Misbah, whose 51 came from 74 balls and featured two fours and one six, as wicketkeeper Sangakkara held on to an inside edge.
That left Pakistan 169-5 and Malinga and Lakmal did not waste time in wrapping up the tail.
Ali offered some resistance with an unbeaten 41 but he ran out of partners as Pakistan's innings ended after 49.3 overs.
Sri Lanka were on the ropes as a late clatter of wickets left them needing 18 off the final two overs with just two wickets remaining.
But sixes from Chandimal and Ajantha Mendis in the penultimate over put them on the front foot and Mendis sealed victory with a four with two balls to spare.
Angelo Mathews' men looked like they were going to cruise to victory in their reply as openers Kusal Perera and Tillakaratne Dilshan engineered them safely through the opening 12 overs.
The former was swinging the bat and sat three runs short of half century off just 41 balls when he fell lbw while attempting to reverse sweep Mohammad Hafeez to fine leg.
That took the score to 75-1 when Kumar Sangakkara came to the crease and he and Dilshan continued to score steadily before the opener fell for 45, hoisting a Junaid Khan delivery into the hands of Saeed Ajmal.
Just four overs later, Sangakkara was on his way back to the pavilion as he was clean bowled by Khan for 22 and all of a sudden Sri Lanka looked like they could be wobbling at 129 for three.
Chandimal was at the other end and it looked like he may have to hold the reply together as Ashan Priyanjan departed for a single run, edging Umar Gul to wicketkeeper Umar Akmal.
Mathews then helped to steady the ship but the run rate dried up as Sri Lanka began to fall behind in the game and when he edged Anwar Ali behind for just eight, they needed more than a run a ball.
A dramatic finish looked on the cards but Chandimal was running out of partners and when Kithuruwan Vithanage was bowled by Ajmal for 14 it was advantage Pakistan.
Sachithra Senanayake holed out to Hafeez off Khan for three with the final ball of the 45th over and just three balls later Malinga was gone, bowled by Ajmal for a golden duck to leave Sri Lanka 195-8.
But Chandimal was showing some determination as he brought up his 50 off 62 balls leaving his team needing 18 off the final two overs before he and Mendis produced their big finish.
Pakistan had already won the series, which finished 3-2 to the hosts. The two teams will play three Tests, the first starting in Abu Dhabi on Tuesday.