Misbah-ul-Haq defied critics and his advancing age to take Pakistan from the depths of a major spot-fixing scandal to the world's number one Test team, becoming their most successful captain along the way.
The 42-year-old, who will retire at the end of the West Indies Test series starting Friday, completed Pakistan's climb to the top of the rankings with a hard-fought draw in England in 2016, exorcising the ghosts of the tainted visit six years earlier.
Derided for his cautious batting in the semi-final loss to India in the 2011 World Cup, and forced to retire early from the Twenty20 format, a more sensitive soul may have retreated into early retirement.
Not so for Misbah, who started out in street cricket, weathered early trials and disappointments and has survived to become the oldest current Test player.
Born in the city of Mianwali in the central province of Punjab, he was advised by his father, a disgruntled ex-hockey star, to put aside thoughts of being a sportsman and pursue his studies.
His father's untimely death briefly changed young Misbah's priorities, and he reluctantly agreed to a job at a textiles company -- but never showed up for work.
"It was a tough decision," Misbah recalled to AFP. "I had to fight with circumstances and finally made my mark in cricket grounds."
In order to overcome a lack of opportunities in his hometown, he regularly commuted by train to bigger cities where he laid the foundations of his career, first in street tournaments featuring tennis balls bound in electric tape, and later at domestic level.
His international career started with the tour of New Zealand in 2001, but he failed to make an impression and was duly dropped in an era dominated by middle-order heavyweights Inzamam-ul-Haq, Mohmammed Yousuf and Younis Khan.
But he forced himself back into contention with strong domestic performances and was a surprise pick for the inaugural World Twenty20 in 2007, where at the age of 33 he was Pakistan's find of the tournament, bringing them tantalisingly close to victory over arch-rivals India with a knock of 43 in the final.
- 'desperate times' -
He got out to an infamous scoop shot that was seared into fans' collective memory, as Pakistan fell short by five runs.
"It was very disappointing to lose that final," he said. "I brought Pakistan back from a losing position but couldn't cross the finish line and that's the most disappointing moment of my career."
Misbah followed up with two brilliant Test hundreds on the 2007 tour of India, but his career dived again following a poor showing on the Australia tour in 2010.
"They were desperate times," he told AFP at the time. "You are in the eleven and suddenly you are out, it prompts you to burn all your cricket equipment in anger."
That summer, Pakistan found itself led by a young and well-regarded captain in the shape of Salman Butt, backed by two of the best fast bowlers in world cricket, Mohammad Asif and Mohammad Amir.
But after some encouraging performances, the team and its fans were left reeling when a British tabloid spot-fixing sting led to lengthy bans and jail terms for the disgraced trio.
Much-maligned Misbah was handed the daunting task of rebuilding, and never looked back.
Aided by unreadable off-spinner Saeed Ajmal, his canny captaincy and calming presence helped unite a fractious team which he led to nine undefeated series (five won, four drawn) in the UAE, where Pakistan's home matches are played for security reasons.
In 2016, he was handed the International Cricket Council's Spirit of Cricket award, and his current win-loss ratio stands at 24-14 -- spoilt somewhat by the consecutive whitewashes to New Zealand and Australia which prompted calls for him to finally retire.
A last hurrah against an unfancied West Indies side may give him a fitting send-off, and Misbah believes posterity will view him kindly.
"My legacy will be in my numbers and the respect earned by the team," he said.