Day 2, stumps Pakistan 308 for 8 (Fawad 109,Faheem 64, Rabada 2-45, Ngidi 2-55) lead South Africa 220 by 88 runs

A dog may eventually tire of chasing rabbits around a farm, or a cat bored of playing with its food, but Fawad Alam never looks like he'll get fed up of beating bowlers into submission in Karachi.

On an attritional day at the National Stadium, Pakistan couldn't have hoped for a better anchor. Their long-forgotten domestic stalwart adapted to the international stage the formula he had perfected in the domestic circuit, making an almost chanceless century that put Pakistan in firm control at stumps on the second day. They lead by 88 with two wickets remaining, even as South Africa toiled on a surface that did not offer the kind of assistance they would've expected.

While the day was dotted with useful Pakistan partnerships right through the middle order, perhaps no stand quite hurt the visitors as the one between Fawad and Faheem Ashraf. Fawad might have more substance over style, but Faheem's easy elegance and casual indifference to his batting is equal parts entertaining and effective.

A pair of boundaries off Kagiso Rabada got him going, and as Pakistan approached, and then exceeded South Africa's first innings total, Faheem's respect for the bowling attack continued to diminish. Within no time, it seemed, he had brought up a half-century with a couple off Anrich Nortje. By the time he was dismissed, Pakistan had put on 102 for the seventh wicket, extinguishing South Africa's hopes of turning this into a one-innings shootout.

The day required dogged application and endless patience, and it came naturally, in Fawad, to a man who has waited his turn for a decade. With Azhar Ali, Fawad Alam began to diffuse the adrenaline that must have been coursing through South Africa to begin the day, with Quinton de Kock's side no doubt hoping to take a chunky first-innings lead.

As the sun rose higher over Karachi and Fawad and Azhar - who was just as crucial to the Pakistan effort in the first session - began to settle, it became apparent that if the bowling wasn't at near superhuman level and the batsman weren't going to be desperate to gift their wickets away.

Pakistan were clear in their minds about the task that lay ahead and set about it in the first session with the sort of calm that had been so distinctly absent in the dying stages of day one. There wasn't as much variable bounce for either Rabada or Nortje to exploit, and once a couple of early jitters were seen off, the home batsmen's comfort and confidence at the crease began to grow. A loose over from Nortje saw Pakistan take ten runs that brought up their fifty, and from there on, the task of accumulation and survival became somewhat more straightforward.

There was never any panic even when the runs dried up, and once the spinners were introduced, the pair of Azhar and Fawad appeared to have a more assured plan of handling them than their South African counterparts had been 24 hours earlier. There were no low-percentage attacking shots, and they played both Keshav Maharaj and George Linde on merit rather than on preconceived notions of the tricks the pitch would play with those deliveries.

Maharaj was the bowler who continued to look most likely to break through, responsible for giving both batsmen a somewhat uncomfortable moment each this morning. Azhar was a little fortuitous to survive an lbw shout on the technicality that there was no way of knowing whether it struck bat or pad first, while an edge from Fawad just missed Dean Elgar's hands at first slip.

It might only have been a half-chance, but took on an outsized importance as Fawad's gritty, resolute innings began to turn into an epic. The half-century might have taken 150 balls, but this is his home ground, after all, and the old adage about familiarity breeding contempt might hold true.

Fawad began to use his feet to the spinners more and more frequently, hitting over the top to push the field back. And in a moment that is only likely to grow both Fawad's legacy and his cult, he would get to his first hundred at his beloved home ground with a dance down the crease to Maharaj, depositing him over cow corner for a six. If you'd followed him in the Quaid-e-Azam trophy - as Fawad innocently (read: naively) believed the national selectors would -  you'd have seen him do it before, but here it was for the rest of the world to witness.

Maharaj would get Azhar Ali in the second session just as the partnership looked most impregnable, a tickle through to the keeper just after the batsman brought up his half-century. It might have been a soft dismissal, but there was nothing soft about the manner in which Pakistan dealt with a situation that could have unravelled fairly speedily. Mohammad Rizwan averages 55 at this ground over the last five years, and alongside Fawad, he quickly picked up where Azhar had left off.

Rizwan refused to get bogged down in the face of the quicks, flicking Nortje through midwicket when his line wavered and taking the attack to Lungi Ngidi - the least penetrative of the South African bowlers - as soon as he was introduced, forcing de Kock to turn back to his somewhat overbowled primary options earlier than he'd planned.

That adventurousness, however, did come at a price. Rizwan would begin the last over before tea by crunching Ngidi to extra cover again, but when he poked tentatively at one outside off two balls later, he would find an edge that carried to slips, bringing the curtain down on a counterattacking innings.

South Africa, meanwhile, may rue some of their strategic decisions, none more so than the way they used the new ball, persisting with spin against a settled Fawad even as his comfort against the slower bowlers grew. The quicks, who had been  so effective with the first new ball yesterday, were never really allowed to bowl in tandem, and if that was a plan, it was one that didn't discomfit the batsmen much.

South Africa's misery was capped by Hasan Ali getting bowled off a no-ball, with the usually mild-mannered de Kock getting involved in a tetchy exchange with the batsman. The irritations had, understandably, begun to pile up on a day that Pakistan might look back on as the one that rescued a Test match which had threatened to drift.

Danyal Rasool is a sub-editor at ESPNcricinfo. @Danny61000