Dimuth Karunaratne hit a half-century and captain Angelo Mathews contributed an unbeaten 43 as the hosts chased down 153 for victory before lunch.
Their approach to the chase was clear after a 30-minute rain delay at the P Sara Stadium, with Karunaratne and Kithuruwan Vithanage soon setting about the wayward Pakistan attack.
They added 49 for the first wicket at seven runs an over before Vithanage’s exciting, but brief, innings came to an end – he was dismissed by Zulfiqar Babar for 34 after hitting four fours and a pair of sixes in a 23-ball knock.
Kumar Sangakkara’s innings was over after one ball, caught by Azhar Ali off the bowling of Yasir Shah for a duck, but Karunaratne and Mathews made sure there would be no Sri Lanka collapse.
They took the score from 49-2 up to 121 before Karunaratne was dismissed just after reaching 50, Shah trapping him in front to take his second wicket.
But Mathews and Lahiru Thirimanne (20) saw Sri Lanka to their target in 26.3 overs to level the series at 1-1 ahead of the finale in Pallekelle, which starts on Friday.
Mathews said:??The boys showed a lot of character after the defeat in Galle.
“We wanted to bat positively because we were not sure about the rain. So we gave green signal to play positively. It’s easy to get bogged down. The conditions were helpful, I liked bowling here. Kushal Silva is playing the anchor role and others are playing around him.”