Leading a scandal-hit team dismissed as Australia's worst in 30 years, captain Tim Paine's pledge to win back hearts and minds seemed a fanciful, if noble aspiration in the lead-up to the test series against Pakistan.

In the end, it took only five days of cricket before he could claim mission accomplished, having ushered his team to safety in Dubai in one of the bravest fourth innings escapes in the history of the game.

Anchored by a career-defining 141 by Usman Khawaja and Paine's unbeaten 61 on a pock-marked pitch on Thursday, Australia survived 139.5 overs in enervating heat to ensure the series remains alive to the second match in Abu Dhabi.