Hashim Amla (72) and Thisara Perera (47) batted with aggression to help the visitors reach a 175-run target in 19.5 overs to set up an intriguing final match on Friday.
Pakistan had scored 174-6 in their 20 overs.
Babar Azam (45), Ahmed Shehzad (43) and Shoaib Malik (39) had good starts but none of them went on to score big, as Pakistan found it tough going on a slow and low pitch.
Sri Lankan paceman Perera and West Indian spinner Samuel Badree claimed two wickets apiece for the World XI.