Pakistan handed South Africa their first test defeat in almost two years and ended their 15-test unbeaten run after romping to a seven-wicket victory with more than a day to spare in Abu Dhabi on Thursday.
Pakistan, who have a penchant for dramatic collapses, suffered a few jitters as they lost their opening three wickets for a paltry seven runs before overhauling a modest second innings target of 40 to triumph in the first test at the Sheikh Zayed Stadium.
Captain Misbah-ul-Haq hit a flourishing six for the winning runs near the end of the fourth day.
Misbah (28 not out) and fellow veteran Younus Khan (nine not out) steadied the run chase after the first three batsmen were caught behind off the South African fast bowler pair Vernon Philander and Dale Steyn.
Victory was as much as Pakistan deserved after establishing a substantive first innings lead to set the platform for their success.
South Africa won the toss and opted to bat first on what was expected to be a flat track but showed rustiness after a 10-month hiatus from the test arena, only scoring 249 in their first innings. Hashim Amla's 118 contributed almost half their runs.
Pakistan replied with a sizeable 442 as a rare 135-run opening partnership laid the foundation with a maiden test ton for Khurram Manzoor (146) and later 100 for captain Misbah.
The hosts, forced to play at a neutral venue due to security concerns in Pakistan, then took four wickets before the close of the third day on Wednesday to leave South Africa teetering overnight and bowled them out for 232 in their second innings on Thursday, where only a defiant 90 from AB de Villiers and 47 from Robin Peterson delayed the inevitable.
South Africa, who went top of the test rankings last year after a series win in England, last lost to Sri Lanka in Durban in Dec. 2011.
For Pakistan, Thursday's win continued their run of upsets of more fancied opposition at their temporary home in the United Arab Emirates. In their last home series they toppled then top-ranked team England in 2012.
The second test in the two-match series starts in Dubai on Wednesday.