Australia have clung on for a valiant draw in the first Test against Pakistan, grinding out a record-breaking day-five fightback in Dubai as Usman Khawaja and Tim Paine restored pride to the national team's battered reputation.
Chasing a world-record 462 to win, the tourists survived 140 overs - an unprecedented effort to save a game in Australia's Test history.
Skipper Paine was unbeaten on 61 and Nathan Lyon five not out as Australia finished on 8-362.
Australia lost 10-60 in the first innings and had appeared on course for another collapse before Khawaja and Travis Head (72) steadied the ship.
Paine survived 194 balls and shepherded Australia brilliantly during a perilous final hour on Thursday which began with ace legspinner Yasir Shah snaring three quick wickets.
With the pressure mounting, Paine calmly kept the strike during an intense final over from Yasir in which he was surrounded by Pakistani fielders.
A valiant Khawaja earlier dug in for eight hours and 44 minutes, scoring 141 off 302 balls in the second-longest knock ever in the fourth innings of a Test.
Khawaja also scored a determined 85 in the first innings, spending almost 13 hours at the crease in total.
The 31-year-old gazed to the sky and appeared to be overcome with relief as wife Rachel cried in the stands after he brought up his century shortly after lunch.
"It was mostly just about getting a hundred for Australia in the last day of a match when you're trying to save a game," Khawaja said.
"I've worked my backside off for the last 10 years of first-class cricket, day in, day out.
"People think because of my relaxed nature ... that I've been gifted to be able to get to where I am, but it's not the case at all."
The Queensland batsman's maiden Test century in Asia came to an end midway through the final session, the left-hander given out lbw while attempting to sweep Yasir.
Khawaja called for a review but replays confirmed the umpire's decision.
Yasir struck twice in his following over, dismissing Mitchell Starc (1) after Babar Azam took a spectacular one-handed diving catch at bat pad.
He then trapped Peter Siddle in front of the stumps for a duck bringing Lyon, who steered Australia home safely alongside Paine, to the crease.
Pakistan had already squandered their last remaining review on an appeal for lbw against Paine from paceman Mohammad Abbas.
Replays showed a thick inside-edge onto Paine's pads.
Missing Steve Smith, David Warner and Cameron Bancroft to suspensions following the Cape Town ball-tampering scandal, Australia will take plenty of positives from the start of their new era under Paine and coach Justin Langer.
Aaron Finch fell one run short of making half-centuries in both innings while fellow debutant Travis Head scored 72 in the second dig.
Marnus Labuschagne failed to get among the runs in his maiden Test but took crucial wickets with his part-time legspin and impressed in the field.
Dropped catches, missed run-out opportunities and some loose bowling combined to frustrate Pakistan during the first two sessions with skipper Sarfraz Ahmed angrily admonishing left-arm paceman Wahab Riaz at one point.
The hosts also suffered an injury blow with opener Imam-ul-Haq ruled out for the second Test after fracturing his pinky finger while diving in the field.
Khawaja's determined knock came after Finch, Shaun Marsh and Mitch Marsh all fell without Australia adding to their score late on Wednesday.