Pakistan survived a late flutter of nerves to inflict South Africa's first Test defeat for nearly two years and hand England a glimmer of hope in their quest to overhaul them at the top of the world rankings.
Captain Misbah ul-Haq followed up his century from the first innings with an assured unbeaten 28 and brought up the victory by hitting Robin Petersen for six after Pakistan had lost three early wickets as they chased down a target of 40.
Spinner Saaed Ajmal – who had earlier become the second-fastest Pakistan bowler to reach 150 Test wickets by dismissing captain Graeme Smith – ended South Africa's ambitions of posting a significant target when he dismissed Faf du Plessis, Vernon Philander and Morne Morkel, with Junaid Khan taking the crucial wicket of AB de Villiers for 90.
But despite losing Khurram Mansoor, Shan Masood and Azhar Ali for just seven runs, Misbah and Younis Khan guided Pakistan home to extend their record of not having lost in the United Arab Emirates since being forced to play 'home' Test matches there following the 2009 attack on a Sri Lankan team bus in Lahore.
"Even though we showed good character in parts, our skills were not up to the mark," admitted Smith, whose side last lost a match in December 2011 against Sri Lanka and must now win the second and final Test match in Dubai to avoid losing their first away series since 2006. "We have to look at our ability to bounce back and have to improve on a few things and see how we can be more effective, and hopefully make the right decisions."
South Africa currently boast a healthy lead over England and India, who are level in second place in the rankings. However, defeat in Dubai could allow England to close the gap when they face Australia in the Ashes series that begins next month, with South Africa due to meet India in a three-match series starting in Durban on Boxing Day.