Zulfiqar Babar took five wickets as Pakistan beat Australia by 221 runs in the first Test in Dubai.
Australia, set an unlikely 438 to win, were finally bowled out after tea on the fifth day for 216 as the hosts took a 1-0 lead in the two-Test series.
Left-arm spinner Zulfiqar took 5-74 and and leg-spinner Yasir Shah 4-50 as Pakistan finally broke down Australia's resistance after an attritional day.
Mitchell Johnson made 61 while Steven Smith scored 55 to delay Pakistan's win, which came with just 21.5 overs left.
Australia came into the series needing to win both games to displace South Africa at the top of the Test rankings, but will instead head to Abu Dhabi later this week hoping to avoid a first series loss to Pakistan since 1994.
Pakistan had won just two Tests against Australia in the intervening period - at one point losing 13 in a row - and while they were without mystery spinner Saeed Ajmal following his ban for an illegal bowling action, their slow men led the way to a memorable success.
Zulfiqar completed the job, and his first five-wicket Test haul at the age of 35, when Peter Siddle squeezed a bat-pad catch to Azhar Ali.
Zulfiqar and debutant Yasir claimed 14 wickets between them in the match to leave Australia in a spin ahead of the second Test.
The tourists lurched to 105-7 in the morning session before Smith and Johnson half-centuries offered the merest hope they might fight out a draw.
Smith's wicket was the only to fall during the afternoon session, after he dug in for 55 from 175 balls, before he fell victim to Yasir.
Smith had expertly used his feet to the slow men but after skipping down to the leg-spinner he popped a catch to short-leg with the umpire review confirming he had to make a slow walk off.
Johnson then teamed with Siddle in a 43-run stand that took Australia into the final session of the match until he overstretched attempting to smother Yasir's spin.
It was a close call that went Pakistan's way as TV umpire Nigel Llong ruled Johnson's back foot was still on the crease as wicketkeeper Sarfraz Ahmed removed the bails.
Siddle then survived a reviewed lbw call by the barest of margins before Zulfiqar had him caught pressing further forward to finish with seven wickets for the match.
The second Test starts in Abu Dhabi on October 30.