Chandimal finished with 64 not out off 70 balls and added a match-turning 40 runs for the ninth wicket with Ajantha Mandis (19 not out) to see Sri Lanka through with two balls to spare.
Mendis hit the winning boundary and smashed one of the two sixes in Umar Gul's penultimate over which cost Pakistan 15 runs and the match.
Chandimal hit his only boundary to reach fifty before hitting a six off Gul to clinch an unlikely win after Sri Lanka had wobbled at 195-8, derailed by Junaid Khan (3-31) and Saeed Ajmal (2-43).
Perera was aggressive right from the word go, hitting four sixes and three boundaries in his 40-ball knock, but was trapped leg-before by Mohammad Hafeez after he attempted a reverse sweep.
When on 31, Dilshan completed 8,000 one-day runs, becoming the sixth Sri Lankan to achieve the milestone.
But Sri Lanka then lost three quick wickets in the space of just 24 runs, two of those to Junaid.
Gul accounted for Ashan Priyanjan (one) while skipper Angelo Mathews's laborious 31-ball eight was ended by paceman Anwar Ali before Chandimal's rearguard action.
"We were just good enough to win the game," said Mathews.
"Once again, a little disappointed with the batsmen who got starts but didn't go from there. Mendis came to the party, along with Chandimal, and got us over the line."
Pakistan captain Misbah-ul Haq said the series win was satisfying.
"Our team is in good shape," said Misbah.
Earlier, Misbah top-scored with 51 while in-form batsman Hafeez, who scored three centuries in the series, made 41 as Pakistan were bowled out for 232 in the 50th over.
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
