Graeme Smith shared an undefeated 88-run partnership with Jacques Kallis to take South Africa close to a winning position against Pakistan at the close on the third day of the second Test at Gaddafi stadium on Wednesday.
TheĀ South AfricanĀ skipper, who made the 19th half century of his career, batted patiently to score 75 from 164 balls with 11 fours in a second innings total of 154 for two that gave South Africa an overall lead of 305 runs in the match.
The visitors bowled out Pakistan for 206 runs one over after lunch for a first innings lead of 151 after fast bowler Makhaya Ntini took three wickets in one over before the interval.
Pakistan's former captain Inzamam-ul-Haq, playing in his final Test, added just four runs to his overnight total of 10 before he was snapped up by Mark Boucher off Kallis.
Boucher completed 400 dismissals in Tests as Misbah-ul-Haq was caught after top scoring with 41.
There was more bad news for Pakistan when pacer Mohammad Asif retired with an elbow injury after bowling just four overs
Asif who has struggled with his elbow since last year and missed the 2007 World Cup will have an MRI scan on Thursday to determine when he can resume playing.
The final session belonged to the visitors with Kallis (37) continuing his fine form with 351 runs so far in the two Tests.
South Africa lead the series 1-0.
South Africa 1st innings 357
Pakistan 1st innings
S. Butt c Smith b Harris 40
K. Akmal c Smith b Harris 52
Y. Khan b Nel 3
M. Yousuf lbw Steyn 25
Inzamam-ul-Haq c Boucher b Kallis 14
Misbah-ul-Haq c Boucher b Ntini 41
S. Malik c Amla b Steyn 1
A. Rehman not out 25
U. Gul lbw Ntini 0
D. Kaneria c Boucher b Ntini 0
M. Asif c Amla b Harris 4
Extras (lb-1) 1
Total (all out, 63 overs) 206
Fall of wickets: 1-90, 2-93, 3-99, 4-123, 5-149, 6-150, 7-189, 8-189, 9-189
Bowling: Makhaya Ntini 8-1-42-3, Dale Steyn 12-3-60-2, Andre Nel 16-3-39-1, Paul Harris 20-5-57-3, Jacques Kallis 7-3-7-1
South Africa 2nd innings
G. Smith not out 75
H. Gibbs c Akmal b Gul 16
H. Amla b Abdul Rehman 17
J. Kallis not out 37
Extras (nb-1, b-8) 9
Total (for two wickets, 55 overs) 154
To bat: Ashwell Prince, AB de Villiers, Mark Boucher, Paul Harris, Dale Steyn, Andre Nel, Makhaya Ntini.
Fall of wickets: 1-34, 2-66
Bowling: Mohammad Asif 4-1-14-0, Umar Gul 12-2-40-1 (nb-1), Danish Kaneria 21-4-54-0, Abdul Rehman 18-3-38-1