Sri Lanka clinched a thrilling seven-wicket win over Pakistan in the first Test - then barely made it off the field before the rain arrived in Galle.
Having bowled out their opponents second time around for 180, the hosts managed to reach a target of 99 with more than four overs to spare in the final session of the series opener.
Skipper Angelo Mathews saw his side home with a quick-fire 25 after left-arm spinner Rangana Herath had set up the opportunity for a late run chase by claiming 6-48.
After conceding an 82-run first innings lead Pakistan were spun out on the final day despite an unbeaten half-century from Sarfraz Ahmed. The wicket-keeper hit five boundaries in his 70-ball knock but ran out of partners.
Azhar Ali had earlier made 41 in over three hours at the crease before becoming one of five batsmen in the innings to be caught out by Sri Lanka wicket-keeper Niroshan Dickwella.
Resuming on 4-1, the tourists quickly lost nightwatchman Saeed Ajmal for four. Ahmed Shehzad (16) and Younis Khan (13) also fell in a post-lunch session that saw Pakistan add 62 runs.
They continued to be defensive throughout the afternoon, though skipper Misbah-ul-Haq, who needed the help of DRS to overturn an lbw decision given against him, and Ali defied Sri Lanka briefly with a 56-run stand for the fifth wicket.
Misbah wiped off the deficit with the only six of the innings, however both batsmen departed within three deliveries to give Sri Lanka a real sense they could still get a positive result. Herath found Ali's outside edge to end his defiance before Misbah was trapped lbw for 28 when playing back to spinner Dilruwan Perera.
Asad Shafiq then went leg before to Herath and paceman Shaminda Eranga claimed his 50th Test wicket by having Abdul Rehman caught behind in the last over before tea.
Sarfraz did all he could to keep Pakistan afloat but neither Mohammad Talha nor Junaid Khan could stick around in support, the latter the last wicket to go down in an innings that lasted 80.2 overs.
With 21 overs to reach their total, Sri Lanka promoted Mahela Jayawardene to open with some success, the veteran batsman making 26 until becoming the second wicket for Junaid.
Kumar Sangakkara made 21 and although he was out with the score on 73, Mathews rushed Sri Lanka over the line alongside Kithuruwan Vithanage (11 not out) in fading light. They completed the job just in time, with the heavens opening not long after the winning run had been scored.