Mercifully, Misbah takes Tanvir out of the attack and replaces him with Mohammad Irfan, who, along with Ajmal, is the only other Pakistan bowler to have really looked threatening today. De Villiers and Amla milk him for a couple of runs before he surprises de Villiers with a sharp, 144kph bouncer that shots past his helmet and over a leaping Sarfraz Ahmed. Four byes! The over brings runs, but at least Irfan looks like he might take a wicket.
Another half-chance! Ajmal is quite some bowler. Sharp offspin troubles de Villiers, who is happy to use his feet but can't attack the bowling as he'd like to. With the lack of support from the other end, however, South Africa can afford to play Ajmal with caution and attack the support.
Pakistan surely won't win this if Ajmal isn't given any back-up. Tanvir continues, over-steps by some distance once again while striving for extra pace, and is thrashed for four through the off side by de Villiers. He's being hitout of the attack.
WICKET! The match may be running away from Pakistan, but you can never discount Saeed Ajmal! Kallis shuffled right across to the off side and attempted to work Ajmal's sixth delivery into the leg side but it spun sharply past his bat and pinged his pad in front of middle and off. That set off a massive lbw appeal, the umpire quickly giving Kallis out. The South African reviewed the decision, but there was no edge on the ball and he's plumb. Could there be another twist this afternoon?
Another somewhat ineffectual over from Tanvir Ahmed, including a spanking drive straight through mid-off for four by Kallis and a whopper of a no-ball from the bowler. The game slips further away from the visitors, South Africa now needing under 100 to win.
The pressure is evaporating as Ajmal, too, is easily milked for runs by both batsmen. There's not a lot going Pakistan's way, Kallis and Amla combining to take six runs off the over without taking any risks.
Misbah calls upon Tanvir for the first time, but he makes the mistake of offering Kallis successive half-volleys, each of which is threaded through cover with timing and imperious power. Marvellous drives, both of them, and that'll really deflate the bowler and Pakistan.
Ajmal resumes after the tea interval. Amla is a picture of concentration as he successfully defends a maiden. Will South Africa try to finish the match in this session?
This match is moving along quickly now. Pakistan nipped Petersen out early, but Smith and Amla put on a quick 53 runs at more than four an over before Ajmal removed Smith. The door isn't quite shut for Pakistan, but they'll need something really inspired to get back into the match now.
Searching for a wicket, Misbah brings Irfan back into the attack, but Kallis isn't too troubled in playing out the final over before tea. He eases a legside delivery through midwicket for two to take South Africa's target to 116, and the umpires remove the bails.
WICKET! Ajmal strikes, just minutes before the tea interval! Smith bent low to sweep - never his most comfortable shot - and swished across the line of the ball but couldn't lay bat on it. He was struck on the pad in front of middle, and Umpire Oxenford had little hesitation in raising the finger. Kallis is off the mark with a nudge through point. Another quick wicket, and Pakistan will be right back into this game.
Misbah swaps Umar Gul for Mohammad Hafeez, but there's no let-up in the run-scoring as Amla takes the attack to the offspinner. Amla exhibits stunning bat-speed in thrashing a wide ball through cover point, and then dancing down the track to swipe a lofted stroke to the deep midwicket boundary.
That's more like it. Ajmal continues to attack Amla's middle and leg stumps, also trying to bring the close catchers on the leg side into play, in the course of a maiden.
Gul continues to leak runs. Amla is into the 20s with an elegant square drive for four, and might've been hit for another boundary immediately afterwards had Hafeez not pulled off a sharp stop at backward point. Smith adds two more with a firm push through midwicket, and seven runs come from the over.
Irfan is in the wars as both Smith and Amla aim drives towards him off Ajmal. He's not the greatest fielder, and slips to let the ball past him ... but is soon up and after it.
There's still no sign of Tanvir Ahmed as Umar Gul replaces Irfan. His comeback over is a loose one, Hashim Amla scything a cut through point for four and Graeme Smith fetching a half volley into the leg side for three more. Nine runs flow from the over. Pakistan can't afford this sort of inconsistency.
Smith works Ajmal to leg for a single to move to 20, taking the remaining runs needed by South Africa to exactly 150 at the same time. Ajmal's line of attack to Amla is very straight, but he's got some protection on the leg side. The plan very nearly works as he fizzes one down the leg side, Amla overbalancing as he plays at it, but the batsman manages to keep his back foot grounded so there's no danger of a stumping.
This could be the final over of Irfan's spell. He angles the ball repeatedly across Amla on a shortish length, but the batsman won't be tempted and so he pitches it up ... only to be driven for four through cover point.
Saeed Ajmal is brought into the attack, and his very first delivery kicks up and spins to beat Smith's outside edge. His second isn't nearly as good, and it's cut away to the backward point boundary, but he soon settles on a good length to test Smith's defense. Is there a case for bringing Hafeez on ahead of Tanvir?
Irfan appears a bowler transformed with the new ball in his hands. He was also, perhaps, a little more nervous in the first innings, on debut. Now, he's charging in with great purpose, and again extracts pace and bounce to trouble Amla. His lines to Smith aren't quite as effective, and five runs come from the over, but it's another decent one.
Umar Gul isn't close to Irfan's height, but he also finds a hint of extra bounce off this track when he bends his back. He beats Smith's cutting bat with a lifter outside off, and his lines are generally much better as he concedes just one run off the over.
Irfan keeps Amla pinned on the back foot in the first half of the over, but when he does pitch it up Amla is waiting for it and punches three runs down the ground with a checked straight drive. Smith's meaty forearms are then put to good use as he works a single into the leg side.
WICKET! The reprieve, for Petersen, is short. He's trapped on the crease by a Gul indipper, and removed lbw for 1. Amla is off the mark with a hard-run two into the leg side. Pakistan need another early wicket, before Ajmal comes on, if they are really to put pressure on South Africa.
Should have been a wicket! Irfan is bowling so well, but he's got a no-ball issue, and now it's really cost his team. He hurried Petersen with a short, quick one. The South African was late on the pull, spooning the ball to Ajmal at mid-on. But Umpire Davis wants to check for the no-ball. His heel is on the line, but there's nothing behind it so that's not out. And he had a wicket disallowed in the first innings when the umpire wrongly called no-ball ... That'll demoralise Pakistan.
Poor lines from Umar Gul to follow up a good opening over from Irfan. He gifts Smith a leg-stump delivery, the South African captain getting off the mark with a boundary to fine leg. Another one on the pads is tapped away for a single, and Petersen then also flicks one to fine leg. Yet another leg stump delivery is tapped through midwicket for two by Smith, and eight runs flow from the over.
Now, this is why Mohammad Irfan should have been given the new ball in the first innings! He finds shape in through the air, pace and alarming bounce throughout this over to trouble Petersen. His first ball results in an lbw shout, his third in another - and this time Pakistan want to review it. It's mighty close, but the line of the ball mean it's umpires' call: and Davis had given the decision not out.
So, Pakistan are bowled out for 181, and South Africa will have the better part of five sessions to chase the runs down. Pakistan's collapse today has been startling: they lost six wickets for just 22 runs. There is, however, still one thing that stands between South Africa and victory: Saeed Ajmal.
WICKET! Steyn finally gets the better of Irfan. Pakistan's no. 11 couldn't get out of the way of another short one, closing his eyes and fending at the ball, which hit the splice and looped easily to Petersen in the slips.
A welcome boundary for Pakistan at last, Tanvir swatting Peterson down the ground for four. That takes the lead beyond 180, which is probably still not enough.
Smith spreads the field with Tanvir on strike, the batsman taking the single on offer and yet again exposing Irfan to Steyn. The world's tallest cricketer fends a brutal lifter straight through the vacant gully area, and takes a single himself.
Tanvir isn't going to die wondering. He charges out repeatedly at Peterson, aiming to blast the ball over Table Mountain, but manages only a two to midwicket and an inside edge before he takes a single to keep strike to Steyn.
Tanvir scoops a drive just over cover and takes a single, exposing Irfan to a fired-up Steyn. The no. 11 wears a bouncer on the chest and edges just short of Kallis at slip, but keeps the ball out when it's aimed at the stumps and survives the over.
WICKET! The first over after lunch brings yet another wicket, Ajmal perishing. Peterson stuck to a line well outside leg stump - so far, in fact, that one of his deliveries was called wide by Umpire Bruce Oxenford - and was rewarded as he landed one in the rough and bowled a sweeping Ajmal round his legs.
What a first session on day four. A remarkable Pakistan collapse after the ball change has allowed South Africa to storm back into the match. Pakistan now lead by just 169 runs, with 2 wickets remaining. South Africa are in charge, but if Pakistan can push their lead beyond 200, things could get very interesting. Join us in half an hour or so for the second session.
A fiery, but wicketless, over from Dale Steyn takes us to lunch.
A one-handed Saeed Ajmal sweep puts Tanvir on strike. He puts his front pad to good effect, kicking multiple deliveries pitched outside leg stump away. We'll probably have just the one more over before lunch, unless South Africa take the extra time.
Another probing over from Philander, who zips one past a driving Tanvir's outside edge. Ajmal finds a single, and lunch is now just five minutes away. Will South Africa take the extra 15 minutes and try to bowl Pakistan out?
Tanvir Ahmed and Saeed Ajmal will, I think, both go for their shots. Tanvir picks up a single with a swat down to long on, the ball landing in front of the fielder down there, while Ajmal sweeps for one more.
WICKETS! Pakistan are crumbling as Philander takes two in the over. First to go is the obdurate Azhar Ali, who presses forward in defense but can only edge a perfect outswinger through to de Villiers. Gul then unnecessarily flings the bat out at a wide one to fall for a pair, thanks to a stunning catch by Alviro Petersen in the gully. Saeed Ajmal keeps the hat-trick ball out, but South Africa are surging and the lead is just 164. There have been four wickets taken and just 9 runs scored in the last 24 balls! That ball change has worked a treat for South Africa ...
WICKET! And another one falls! Sarfraz started this over from Peterson so well, using plenty of bottom hand to shovel a leg-stump delivery out to the deep square leg boundary, but ends it disastrously. He completely misjudges a delivery landing on leg stump, shouldering arms and allowing the ball to crash into his off stump.
WICKET! Asad Shafiq departs! A terribly unlucky dismissal for him. The ball after slashing a cut up and over point for four, he steps back and across to defend ... but the ball hits the bat low and bounces back towards the stumps, dislodging the off bail. Shafiq actually turned to watch the ball, but was frozen in the crease as it hit his stumps. Very unlucky. Sarfraz is beaten by an outswinger first up, but is off the mark with a glide through point.
Peterson sticks to a tight, defensive line on leg stump to restrict Azhar and rack up another maiden.
Philander returns to the attack, and his accuracy means there aren't as many scoring options for Pakistan's batsmen. Azhar starts the over by chopping a single through point, but Shafiq is content to have a good look at the new bowler. With two slips and a gully in place, and with an old ball in his hand, Philander beats the outside edge yet again.
A rash shot from Shafiq! He skips out at Peterson and attempts to thwack the ball down the ground, but the over-the-wicket angle and some turn out of the rough means the sliced drive flies over point instead ... and lands safely! Five runs come off the over, but Pakistan needn't be taking those sorts of risks.
Another zippy over from Steyn. Azhar guides a single through gully, and Shafiq is tested by a sharp bouncer, both batsmen standing firm. The new ball is over 20 overs away, and Pakistan now lead by 149. If these two batsmen keep on scoring freely, the game will start to move out of South Africa's reach.
There's apparently been a ball change during the drinks break, the umpires seeing fit to switch the current old ball for another. Peterson continues to come over the wicket, landing the ball repeatedly in the rough outside leg stump, but Azhar reads the line and length of the ball really well, and after defending four deliveries works a single into the leg side.
This over from Steyn is noticeably quicker, his length shorter. He operates in the mid-140s, but Azhar is equal to the task and nudges three runs off the over. And that takes us to drinks on a hot, sunny day at Newlands.
With the batsmen looking to be positive, Peterson goes back over the wicket and aims for the rough outside leg stump. Just two singles off the over as Azhar and Shafiq play with the pad whenever possible.
These two young batsmen are counterattacking in style! Now Azhar has a go at Steyn, standing tall to punch a backfoot drive through cover point and then leaning forward to thread the gap at cover with a well-timed cover drive. Six runs off the over.
Peterson's line and length goes completely awry, and Shafiq takes 10 runs from the over. After two defensive strokes, Shafiq slaps a full toss to the midwicket boundary, drives a wide half volley through cover for two, and then rocks back to hammer a long hop into the leg side.
Steyn comes back into the attack after the breakthrough, and very nearly grabs another! He pitches the ball right up to Azhar Ali's bat and some away shape draws a skewed drive and an outside edge ... but it drops short of Kallis at slip! The rest of the over is rather less eventful, Azhar playing out a maiden.
WICKET! Peterson's over-the-wicket, leg-stump line to Misbah has worked! He'd speared several deliveries at the Pakistan captain's pads, denying him the chance to score, and the frustration eventually told. Misbah tried to sweep, but top-edged and the ball looped gently to Graeme Smith at short fine leg. Peterson goes back over the wicket to Asad Shafiq, with a slip and short leg in place, and completes a wicket maiden.
Azhar Ali goes to fifty, and in suitably restrained fashion. Philander lands one just a little too full and Azhar leans forward to place the ball through cover, rushing back for a second run. A workmanlike, gritty half-century.
There's an appeal for a catch behind the wicket after Misbah attempts a reverse sweep against Peterson. South Africa's experience with the DRS in this Test means Smith quickly asks Umpire Oxenford whether he's given it not out because Misbah didn't hit it, or because the ball hit the ground. Oxenford replies that he's just not giving it out, and so the review is called for. Replays quickly show that Misbah hit it straight into the ground, so that's not out. Misbah bats out the maiden safely.
Philander, meanwhile, is still utterly metronomic. Playing outswing to the off side and in-dip to the leg, Azhar is unable to find the single he needs for a fifty with his defensive bat in the course of a maiden.
Steyn's opening spell is a short one as he's replaced by Peterson. The left-arm spinner hangs the ball high in the breeze with generous flight, and his in-drift takes the inner half of Azhar's bat to start the over. It's three runs, rather than a wicket, that are the result, however, and Misbah also sees fit to power a sweep shot to the fine leg boundary.
Philander is flirting outrageously with Misbah's outside edge. This is Test match bowling of the highest quality. There's no great pace for Philander, but just about every delivery is pitched perfectly and the away movement means each ball is aimed at the outside edge or goes past it. Philander does, in fact, find the edge but Misbah is playing very late and with soft hands, and so the ball goes to ground quickly and beats the slips to run away for four.
Steyn's line and length this morning have been impeccable. He aims just about every delivery in this over at the top of off or the top of middle, and Azhar has to have his wits about him as he bats out a maiden.
Azhar Ali opens Pakistan's day four account with a characteristic nudge into the leg side for a single. Philander's line and length are similar to Steyn's, but he's finding much more curve through the air with this old ball and swings three consecutive deliveries past Misbah's outside edge. Classical swing bowling.
A subdued start for both bat and ball. Steyn's length is full, attacking the off stump, but Misbah's low backlift and perpendicular bat are up to the task of keeping the ball out. A maiden to start with. I have the feeling we'll see a lot of those today.
Hello and welcome to our over-by-over commentary on day four of the second Test - in the three-match series - between South Africa and Pakistan at Newlands in Cape Town.