Never mind the last over. This was never meant to go to the last session, with Pakistan having left 140 overs for themselves to bowl Australia out. But Australia, spearheaded by a superhuman effort from Usman Khawaja, who batted for 302 balls, and captain Tim Paine at the end, kept Pakistan out, ensuring a draw that simply wasn't an option for much of this match. It required Nathan Lyon batting with his captain for the last 11 overs, when it looked like the visitors would succumb after Khawaja had been dismissed, but Paine and Lyon rallied. As Pakistan prowled, Paine dug deep.

The records might be meaningless to an Australian side playing to salvage their reputations after the disaster of Cape Town a few months ago. After that, Paine said he wanted to captain an Australia side the fans could be proud of. It's taken no more than one Test match to achieve that, with Australia summoning all their powers of grit and fortitude to ensure that they would make the opposition earn a win over their dead bodies. As it was, Australia remained alive, just, and Pakistan, having dominated for such large periods in the match, had nothing to show for it.

But there were records made and records broken along the way. This was the second-highest fourth-innings score by a visiting team in Asia in history. Khawaja, who scored 141, surpassed the record for the highest-ever fourth-innings score by an individual batsman, going past Younis Khan's 131 in 2010. Australia played one ball short of 140 overs, longer than they've ever batted in the fourth innings of a Test. All that work to ensure the series remained 0-0. How's that for fighting spirit?

It really wasn't meant to be so difficult for Pakistan, who needed just seven wickets today to complete what looked like a routine win. But Khawaja and Travis Head carried on from where they had left off yesterday, batting 49 overs together and keeping Pakistan wicketless all morning to begin raising hopes, however faint, that a draw was possible.

Draws between these two sides don't come too often; the last one was 20 years and 20 Test matches ago. Pakistan looked like they were on their way again after Mohammad Hafeez - who in hindsight was perhaps a little underused - trapped Head in front two overs after lunch.

Marnus Labuschagne never appeared set against the spinners, as Yasir began to look more potent than did at any point all match. He finally got his first wicket as the debutant went back to a delivery that went straight on, and was trapped plumb in front of middle.

Even Tim Paine, who in the end was the man holding back a Pakistan surge, seemed particularly vulnerable for the first half hour in the middle, never quite sure of his footwork, or of which ball to leave. But some of Khawaja's confidence rubbed off on his captain. As Paine began to get set, Pakistan found themselves having to break down the third significant partnership of the innings, with time running out.

There was little drama for the first 90 minutes or so after tea, but Yasir finally broke through Khawaja's vigil with a googly that the left-hander, for once, failed to sweep effectively. That brought Mitchell Starc to the crease, and gave Pakistan fresh hope. Within 13 balls, Pakistan had Australia eight down, and with Australia still needing to bat almost 13 overs, Pakistan were on course yet again.

Crucially, though, Paine still hung around. In Lyon, he found a man able to shut out pressure, and simply focused on the task at hand. So comfortably did Lyon hold his end up that Paine never really looked to farm the strike. For a captain just two matches into the job, it is an ideal way to set the tempo for his tenure, as he embodied the virtues he wants his side to embrace, and played the game (in its true rather than vapid sense) hard but fair.

The team spirit of Australia had been visible all game, even on the first two days when Pakistan's batsmen were grinding them into the dust. The shoulders never dropped, the fast bowlers kept their pace up, and the spinners' lines never wavered. Australia were fully focused on the task at hand, right until Paine blocked Yasir Shah's final delivery, forcing Sarfraz to pull out the stumps and offer him a handshake.

If Paine's request to start the match with handshakes had seemed a little contrived to Sarfraz, the Pakistan captain reciprocating the gesture at the end would have been out of nothing but respect.