Pakistan put the disappointment of the one-wicket defeat in the first Test in Jamaica behind them as they squared the series in Kingston, with left-arm quick Shaheen Afridi picking up 10 wickets in the match.
The visitors had set a 329-run target despite losing an entire day's play and another session to rain at Sabina Park on Tuesday.
But Afridi kept Pakistan in the hunt as he picked up four wickets in the second innings - to go with his career best 6-51 in the first innings. Just when it seemed the weather would play spoilsport again, Afridi came back with the second new ball to take the last two wickets and seal victory with one hour to spare.
The win was set up in the first inning by Pakistan batsman Fawad Alam, who scored his fifth Test ton, and captain Babar Azam who made a timely fifty.
"This was a very important win for us, especially given the way we lost that first Test," Babar said.
"My partnership with Fawad Alam and his brilliant century was of course valuable, but I have to give massive credit to the bowling of Shaheen because he make things a lot easier for us."
With the Test series now concluded, Ajit Vijaykumar provides his player ratings for the Pakistan team in the photo gallery above. To move on to the next photo, click on the arrows or if using a mobile device simply swipe.