(CNN) -- Sri Lanka have sealed a historic first Test series victory against Pakistan after completing a crushing seven-wicket win on the third day of the second match in Colombo.
Sri Lanka batsmen Mahela Jayawardene, left, and Thilan Samaraweera celebrate their victory in Colombo.
Pakistan had resumed play on Tuesday at 178-1, looking well-placed to set the home side a challenging fourth-innings target.
But the tourists crumbled to 320 all out just after lunch as spinner Rangana Herath claimed his first five-wicket haul in Test cricket to help his team to an unassailable 2-0 lead.
Set 171 to win, Sri Lanka cruised to victory in 31.5 overs with opener Malinda Warnapura top-scoring on 54 from just 56 balls faced and captain Kumar Sangakkara contributing 46 from 64 deliveries.
Pakistan captain Younis Khan was demoralized after the match, having seen his side lose the first game of the three-Test series with a second-innings batting collapse and then be skittled for only 90 in the first knock at Colombo.
"It's not the first time that we collapsed, it's the third time," he said at the after-match presentation. "The problem is the fact that we haven't played much Test cricket in the last couple of years.
"Everyone knows Test cricket is a massive test of skill. In the first game too we were in a good position and then we collapsed. The same thing happened here.
"The bounce was low on this wicket and think we have to tailor our game according to the situation. This wicket required a change in technique and style."
Younis did have some praise for debutant opener Fawad Alam, who moved from 102 overnight to reach 168 as he added 200 for the second wicket with his skipper.
"Alam has played all his cricket in the middle order, but I asked him whether he would open for the team. His response was fantastic," said Younis, whose dismissal for 82, being caught off a top edge trying a reverse-sweep, started a collapse of nine wickets for just 35 runs.
Herath finished with career-best figures of 5-99, while opening bowler Nuwan Kulasekara chimed in with 4-37 to take eight wickets for the match.
"It was hot, the wicket wasn't offering much in either turn or pace, but the two of them really turned the tables," Sangakkara said. "It just goes to show if you have heart and if you bend your back and put in the effort, the rewards will come.
"It's a very special win and something that all of us wanted. But we didn't expect to win in this fashion. They have been two very absorbing Test matches with the balance swinging this way and that between the two sides."
"But I think the key for us was that whenever we needed someone to step up and take responsibility, there was always someone to put his hand up."