“It means a lot,” Warner said of his century. “My family and I have obviously had a tough period." Photo: Andrew Boyers/Reuters

SYDNEY – The leap in the air was the same, and there was the same kiss of the helmet, but the David Warner who celebrated his 22nd test century on Friday looked a different player from the man who scored a 21st nearly two years ago.

At the Boxing Day test at Melbourne Cricket Ground in late 2017, Warner was the uber confident vice-captain of an Australia side heading towards a 4-0 Ashes triumph who reached the milestone in 130 balls after smashing 13 fours and a six.

Warner's life would be turned upside down just a few months later in the second test against South Africa when the ball-tampering scandal saw him sent home in disgrace with a 12-month ban from top class cricket.

Cast as the villain of the piece by the local media, Warner held a tearful news conference at the Sydney Cricket Ground before heading into the embrace of his family to plot his return to the game that had earned him fame and fortune.

The 33-year-old was back in the test arena in another Ashes series earlier this year in England but his form was disappointing for a batsman who had spent most of his career in the top five of the world rankings - 95 runs from 10 innings.

Against Pakistan at the Gabba in Brisbane on Friday, the strutting opener was replaced by a determined battler who took 180 balls to reach the hundred with seven fours and nothing close to the flourish of a six.

“It's never been in doubt, the mental toughness of the guy,” former captain Allan Border said on Fox Sports.

“What he's been through would have tested most people. Whether you want to continue playing at this level or take the easy cash by playing white-ball cricket, which he's so good at.”

Certainly, he rode his luck on his way to the 151 not out that put Australia in a dominant position, not least in the one echo of the 2017 MCG knock - a reprieve at the hands of a bowler making his test debut who overstepped the mark.

In 2017, it was England's Tom Curran who thought he had his first test victim when the opener was on 99, while on Friday 16-year-old Naseem Shah was celebrating his maiden wicket when Warner made his abrupt about-turn.

“It's never been in doubt, the mental toughness of (Warner),” former captain Allan Border. Photo: Paul Childs/Reuters

There was also a near run-out on 93 and the Imran Khan delivery near the end of the day that hit his off stump but failed to move the bails which had Warner talking of “someone watching over me up there”.

He relied on timing and shots more than the pure aggression that defined his earlier career when he was dismissed by some as a limited overs masterblaster, but his intent was still clear from ball one.

“It means a lot,” Warner said of his century. “My family and I have obviously had a tough period but that support from Australia here doesn't go unnoticed and I can't thank everyone enough.

And obviously my team mates, they've been outstanding.”