There's an unlikely name at the top of the run charts in the ongoing series between South Africa and Pakistan. Unlikely, primarily because he's a Pakistani in a series in South Africa, not to mention a series South Africa have sealed in barely over six days, with one Test still to go. Unlikelier still because Pakistan have failed to clear 200 in three of their four innings.

But what makes the chart-topper even more improbable is that he wasn't supposed to have played any part in the series. It wasn't until an eleventh-hour injury to Haris Sohail, which forced him out on the morning of the Boxing Day Test in Centurion, and later the series, that Shan Masood was thrown into the side. Thrust in at number three, a position the opener had never batted at at Test level, Masood was required to make an impression in the most challenging of environments, particularly for a player who had last played international cricket 14 months ago.

That Masood hasn't been a regular has been a riddle for Pakistan cricket. A tall left-hander with an easy elegance, he has been a Test underachiever, averaging a mere 23.54 across his first 24 innings. That he never seemed to get a long enough run can't have helped; of the 45 Test matches Pakistan played between his debut and the start of this series, Masood was involved in 12. More tellingly, that disappointing dozen had come across no less than five different spells, with Masood never allowed more than three consecutive Tests. And so, dropped in 2017 after a wretched home series against Sri Lanka, Masood was intent on doing whatever it took to work on whatever had held him back.

He sought help from Abdur Rehman, a renowned but oft-overlooked local coach from Peshawar, who has worked with Pakistan A sides. More unusually, he reached out to several independent analysts, in a bid to fortify both mental and technical aspects of his game. One of the key technical changes from these sessions is Masood playing with softer hands than previously, and a short stride towards the ball giving him the balance to prevent his head falling over.

Even his success against the short ball in this series could arguably be attributed to that shorter stride, preventing him from getting too low, and the ball from getting too big on him.

Otherwise, the importance of surviving the start of an innings, the first 20 balls or so, has been driven home. That is something Mickey Arthur has impressed upon his players as well. For the past year or so, Masood has been thriving even if most of his runs have come in the white-ball formats. But a stellar start to the Quaid-e-Azam Trophy this season saw him called up to Pakistan's A squad, where he was able to display the dazzling form he has carried over to South Africa.

Two hundreds in a first-class game against New Zealand A, followed by 73 in the next match and a 161 in a List A match against England Lions in November saw him called up to the South Africa tour. Once given the chance, he appears to have finally settled into the side looking like a permanent presence instead of a stopgap to be discarded in favour of a more promising option.

The most eye-catching trait has been his tendency to pick the South African pacers' length early, an ability that has helped him blunt the hosts' most venomous weapon: the short ball.

Long the bane of most subcontinental batsmen here, and on pitches that are, even by South African standards, spicy, Masood has allowed no excuse to get in the way of runs. Of 42 short balls the South Africans have hurled at Masood, he has scored 46 runs at a strike rate of 109.5; no other batsman to have faced over 20 short deliveries has scored at over a run a ball. The pull shot has been Masood's most effective shot in response to the short stuff; it has brought him 36 runs off just 21 deliveries. Duanne Olivier, who has caused Pakistan the most strife this series so far, has bowled 25 of the 42 short balls Masood has faced, and conceded 29 runs without once getting him out. Masood's control percentage against the short delivery - 78.6 - may be slightly lower than Babar Azam's (80%) or Asad Shafiq's (78.9%), but he has faced more short deliveries than those two combined (42 as opposed to 39). Moreover, he has scored 46 runs in that time, with the other two managing 20.

Shan Masood played the pull shot confidently Associated Press

Masood credits his striking improvement from last year to time spent out in the middle.

"I've played a lot of cricket in this time," he says. "I know we undermine domestic cricket a lot, but I've gone back into it and played a lot of domestic games. It also helped that after a very long time, we had a few good A tours. We played New Zealand and England, and the Australian national team in a warm-up game. So as a cricketer, you have to play more and more games and that's how you're going to get better.

"Any work you do outside the field won't matter as much unless and until you go inside and perform. That's the only thing that's going to get you better and give you the experience to take on international cricket. It doesn't matter how good you look, what matters is the runs column. I'd like bigger runs. I'm working towards it and hopefully whatever I've done in the past can reflect onto bigger runs in the future."

That, perhaps, is the next step Masood must take if he is to feel more secure of an extended run in the side. Scores of 19, 65, 44 and 61 suggest promising starts without the conversion rate that makes world-class batsmen, well, world class. In South Africa, those big innings may be hard to come by - only one century has been scored all series - but Masood believed the pitches here, for all their challenges, allowed batsmen to score.

"There'll be a ball that has your name on it but the good thing about these surfaces is that they give you the opportunity to score," he said. "So after lunch on day one [in the Cape Town Test] when me and Sarfraz came out, we got a lot of runs away and a lot of boundaries quickly. Unfortunately, I fended at one I should have left, but this surface always keeps the bowler in the game.

"When two batsmen get set we have to make sure they go on and score big. The story of the tour is batsmen have got in and got good starts, but nobody went on to get that big score."

In addition to the improved technique, the bloody-mindedness of Masood has made him a different beast to the one who played for Pakistan earlier. Having found a bit of good form at No. 3 and crediting the openers for making it easier for him, Masood wasn't given much time to make that spot feel like his own. With Fakhar Zaman struggling badly against the new ball, it was Masood rather than Azhar Ali who was catapulted to the top of the order. There he was, Pakistan's accidental starter, starting up against Dale Steyn and Vernon Philander.

Undaunted, he scored another half-century from that position, but, much like the first innings, ended up paying the price for small lapse in concentration. Lured into poking at one from Steyn when on 61, his outside edge carried through to the wicketkeeper, with the pain in his eyes evident for all to see.

The desire, competitive spirit, and will to improve have never been in question. More than once throughout his career, he has sought out people from outside the game, and looked at different ways to improve his batting. When Arthur came in as coach and imposed stringent fitness standards most players struggled to initially match, Masood's name was always at or near the top in that department.

The hours off the pitch have never been the problem for Masood. Now it has translated into hours on the pitch, and, he will hope, many months and years in the Test whites in a career that, five years in, has perhaps only just started.