Pakistan batted out the final session against Sri Lanka to draw the third and final Test match and win the series 1-0 on Monday.
Having been set a target of 255 runs for victory on the rain-hit fifth day, Pakistan opted for safety and were led largely by Taufeeq Umar's watchful 39 from 121 balls to finish on 87 for four from 57 overs.
Pakistan, who won the second match of the series by nine wickets after the drawn first test, are playing "home" Tests in the United Arab Emirates due to security concerns in their own country.
The win comes just days after former captain Salman Butt and bowlers Mohammad Asif and Mohammad Amir were handed jail sentences in London for their role in a gambling-inspired plot to bowl deliberate no-balls against England last year.
Scoreboard
Sri Lanka first innings 413
Pakistan first innings 340
Sri Lanka second innings (overnight 164-5)
T. Paranavitana not out 76
T. Dilshan c Hafeez b Gul 4
K. Sangakkara c Shafiq b Hafeez 51
M. Jayawardene lbw b Gul 20
A. Mathews lbw b Ajmal 13
K. Silva lbw b Ajmal 0
K. Kulasekara b Ajmal 7
R. Herath not out 1
Extras (lb-6, w-1, nb-2) 9
Total (six wickets dec; 58 overs) 181
Fall of wickets: 1-5, 2-80, 3-127, 4-155, 5-155, 6-178
Bowling: Gul 15-1-44-2, J. Khan 5-3-9-0, A. Rehman 12-1-38-0, Hafeez 10-1-34-1, Ajmal 16-2-50-3.
Pakistan second innings
M. Hafeez run out 13
T. Umar c Sangakkara b Randiv 39
A. Ali lbw b Herath 7
Y. Khan c sub b Welegedara 11
Misbah-ul-Haq not out 9
A. Shafiq not out 7
Extras: (lb-1) 1
Total (four wickets; 57 overs) 87
Fall of wickets: 1-20, 2-30, 3-57, 4-77
Bowling: Welegedara 9-3-19-1, Kulasekara 3-0-15-0, Herath 22-14-19-1, Randiv 19-9-21-1, Dilshan 4-0-12-0.