Once again, it is wound-licking time in Pakistan. Everybody knew the team faced a stern examination in South Africa, but not many expected a Test series whitewash. Expectations from the ODI series were even higher - especially after New Zealand had recorded a series win in South Africa a few weeks earlier - but there was disappointment on that front too. And while Pakistan did record an emphatic win in the solitary T20I, victory in a one-off shootout is small consolation for a team whose recent fortunes had largely been on the upswing.

Most of the what-ifs centre on the second Test, in Cape Town, which Pakistan nearly won. Younis Khan and Asad Shafiq posted brilliant hundreds to forge a landmark partnership, and Saeed Ajmal found a turning pitch that fetched him a match tally of ten wickets. Yet Pakistan lost the plot twice in the match: first when they let Robin Peterson's score balloon to 84, minimising Pakistan's first-innings lead, and then again when they suffered a third-innings batting collapse that kept South Africa's eventual target down to a modest 182. Despite these generous concessions, Pakistan came to within four wickets of victory against the world's best batting order.

While it lasted, the retaliation in Cape Town was a stirring comeback. After getting blitzed for their lowest-ever total in the opening Test, at the Wanderers, it had seemed Pakistan would fold in the rest of the series. But they competed with dignity and defiance at Newlands, earning their opponents' respect. Hashim Amla, South Africa's batting lynchpin, said that Pakistan had pushed them to the limit. Had those what-ifs turned out differently, the outcome of the series might well have been altered.

By the time Pakistan arrived for the third Test, in Centurion, however, their morale was demolished and any pretence of fight or competition had been abandoned. Mentally they were defeated even before the toss, and they eventually succumbed by an innings.

This pattern of a loss in the opening Test, followed by a grittily conceded narrow defeat in the second Test, and finally a devastating rout in the final Test, is not new for Pakistan. It happened in Australia in 1999 when Pakistan pushed the hosts to the wall in the second Test, in Hobart, and again in 2010, when they all but won the second Test of the series in Sydney.

Positives and negatives are embedded in this pattern. At one level, it demonstrates that the team possesses the ability and ingredients to tackle the mightiest lions in their own lairs. Yet it also shows that Pakistan lose their grip after coming very close to a phenomenal success. This has all the markings of a choke, and after they choke, Pakistan lose the will to breathe. Choking isn't something typically associated with Pakistan, who have an impressive record of coming out ahead in close finishes. But Hobart 1999, Sydney 2010, and now Cape Town 2013 are testimony that, when they are within touching distance of an outstanding Test success at the home of top-ranked opposition, Pakistan's killer instinct comes unscrambled.

As if this weakness isn't enough, the team also inevitably manages to deliver a number of self-inflicted wounds. Dropped catches, ground-fielding lapses, needless extras, and run-outs are more or less par for the course for Pakistan, but on this tour unimaginative selection tops the list.

You know you've badly missed a trick when the opposition is left shaking its head over why Mohammad Irfan didn't play in the opening Test, in Johannesburg, which offered the most pace-friendly surface of the entire tour. Irfan's intimidating brand of lift and swing, so impressively displayed in the later matches, could have been devastating there.

It is also perplexing why the team management overlooked Abdur Rehman for the Cape Town Test, which offered the best spinning pitch of the trip. By all accounts, it seemed tailor-made for Ajmal and Rehman to recreate the kind of magic they had produced around this time last year in the UAE. Even the South African commentators noted that the pitch reminded them of the kind of surface one might come across in Dubai or Abu Dhabi. With Junaid Khan injured, there was a natural opening for Rehman to be inducted. Yet for some inexplicable reason, Pakistan chose to play the mediocre paceman Tanvir Ahmed instead, choosing not to take full advantage of the situation.

"Hobart 1999, Sydney 2010, and now Cape Town 2013 are testimony that, when they are within touching distance of an outstanding Test success at the home of top-ranked opposition, Pakistan's killer instinct comes unscrambled"

At the individual level, Irfan and Junaid in the bowling, and Shafiq among the batsmen, have emerged with credit from this tour. Shafiq was Pakistan's best Test batsman, scoring a hundred and a fifty, both under highly demanding circumstances. Younis was not far behind Shafiq, although judged against what was expected of him, he was a disappointment overall. As Younis' career approaches its twilight, Shafiq increasingly looks like Pakistan's future batting mainstay. It has been drowned out by all the other frustrations of this tour, but his partnership with Younis in Cape Town was symbolic of a mantle being passed.

Apart from these few glimmers, there were a number of disasters. Shahid Afridi played all five ODIs, for collective bowling figures of none for 210 from 37 overs, with zero maidens. His last international wicket was in a T20 against India in December, and he has now bowled 247 deliveries without taking a wicket. For a man with a career strike rate in the low 40s, that's a flashing red light. He did make a blistering 88 in one of the ODIs, but didn't hang around long enough to finish the game, and Pakistan eventually lost. Afridi is arguably the greatest limited-overs player ever produced by Pakistan, but he now needs to vacate the allrounder's slot for a younger talent, perhaps Ehsan Adil or Hammad Azam.

Pakistan's perpetual wicketkeeping crisis did not abate on this tour. Sarfraz Ahmed was preferred over Adnan Akmal and given a proper and settled run in all three Tests, but he conceded 22 byes and was dismal with the bat; it remains questionable whether he truly belongs at this level. Kamran Akmal took over in the limited-overs games but largely failed as a batsman and, despite a few acrobatic catches, missed some crucial chances behind the stumps. Adnan's return to the Test squad is therefore certain. Meanwhile, a radical rethink is needed for the wicketkeeping slot in ODIs and T20Is.

The biggest disappointment of all proved to be the top order. After his heroics in India, much was expected of Nasir Jamshed, but though he played some breathtaking strokes, he never showed any appreciable longevity at the crease. Mohammad Hafeez played a brilliant match-winning knock in the T20 game and managed a fifty in a losing cause in the third ODI, but his Test scores of 6, 2, 17, 0, 18, and 0 horribly exposed his technique against pace. Azhar Ali, at No. 3, had looked out of sorts in India and he carried that awkwardness into the South African series.

Crisis in batting looms as the most critical issue as Pakistan contemplates its future engagements, most immediately the Champions Trophy in England, followed by a tour to the West Indies (where Pakistan have never won a Test series), and hosting South Africa and Sri Lanka later in the year, probably in the UAE. Instead of getting distracted by shiny trinkets like the Pakistan Super League and expensive foreign coaches who continue to flop, the country's cricket bosses need to spend their time and energy tracing Pakistan's batting crisis to its roots. Only then can we begin moving towards a rational and effective long-term solution.