South Africa's Duanne Olivier celebrates after getting Pakistan's Sarfraz Ahmed's wicket during day one of the 1st cricket test match between them at SuperSport Park cricket stadium on December 26, 2018 in Pretoria. Image Credit: AFP

Pretoria: Dale Steyn became South Africa's leading test wicket-taker and Duanne Olivier took career-best figures as Pakistan were bowled out for 181 on the opening day of the first test on Wednesday.

But the visitors mounted a spirited fightback with the ball, reducing South Africa to 127 for five at the close. Top scorer Themba Bavuma (38 not out) and nightwatchman Steyn (13 not out) will resume on day two with the hosts still trailing by 54 runs.

South Africa ripped through Pakistan after being asked to bowl by visiting captain Sarfraz Ahmed as Olivier, in the side for the injured Vernon Philander, claimed 6-37 with his pace and accuracy on a wicket already showing variable bounce.

But the headlines will revolve around Steyn, who had opener Fakhar Zaman (12) caught at slip by Elgar to move to 422 test wickets, taking outright top spot on South Africa's all-time list ahead of Shaun Pollock.

He was hoisted on the shoulders of fast bowling partner Kagiso Rabada as the healthy Boxing Day crowd at Centurion Park gave him a standing ovation.

The visitors were in early trouble when Rabada (3-59) had Imam-ul-Haq trapped lbw for a duck.

After Steyn (1-66) had removed Zaman with the score on 17, Pakistan moved past 50 before Shan Masood (19) played the ball on to his own stumps off the impressive Olivier.

Asad Shafiq (seven) never looked comfortable at the crease and became Olivier's second victim as Pakistan took lunch on 76 for four.

The fast bowler ripped through the middle order after the break, removing Azhar Ali (36), Sarfraz (0) and Mohammad Amir (1) in quick succession.

Pakistan were reduced to 111 for eight but mounted an excellent fightback through Babar Azam (71 from 79 balls) as he put on 67 for the ninth wicket with Hasan Ali (21 not out) before being caught at second slip by Faf du Plessis off Rabada.

Pakistan continued their turnaround with the ball as they reduced the home side to 43 for four when Shaheen Afridi (2-36) took the wickets of Dean Elgar (22) and home captain Du Plessis (0) off successive deliveries, both off the edge of the bat.

Aiden Markram (12) and struggling Hashim Amla (8) also fell to high-quality fast bowling from Hasan and Amir, who picked up the wicket of Theunis de Bruyn (29) late in the day.

Scoreboard

Pakistan first innings:

Imam-ul-Haq lbw b Rabada 0

Fakhar Zaman c Elgar b Steyn 12

Shan Masood b Olivier 19

Azhar Ali c De Bruyn b Olivier 36

Asad Shafiq lbw b Olivier 7

Babar Azam c Du Plessis b Rabada 71

Sarfraz Ahmed b Olivier 0

Mohammad Amir b Olivier 1

Yasir Shah lbw b Rabada 4

Hasan Ali not out 21

Shaheen Afridi c De Kock b Olivier 0

Extras (b7, lb2, w1) 10

Total (47 overs) 181

Fall of wickets: 1-1 (Imam), 2-17 (Zaman), 3-54 (Masood), 4-62 (Shafiq), 5-86 (Azhar), 6-86 (Sarfraz), 7-96 (Amir), 8-111 (Yasir), 9-178 (Azam)

Bowling: Steyn 13-1-66-1, Rabada 17-4-59-3 (1w), Olivier 14-3-37-6, Maharaj 3-1-10-0.

Pakistan first innings:

Imam-ul-Haq lbw b Rabada 0

Fakhar Zaman c Elgar b Steyn 12

Shan Masood b Olivier 19

Azhar Ali c De Bruyn b Olivier 36

Asad Shafiq lbw b Olivier 7

Babar Azam c Du Plessis b Rabada 71

Sarfraz Ahmed b Olivier 0

Mohammad Amir b Olivier 1

Yasir Shah lbw b Rabada 4

Hasan Ali not out 21

Shaheen Afridi c De Kock b Olivier 0

Extras (b7, lb2, w1) 10

Total (47 overs) 181

Fall of wickets: 1-1 (Imam), 2-17 (Zaman), 3-54 (Masood), 4-62 (Shafiq), 5-86 (Azhar), 6-86 (Sarfraz), 7-96 (Amir), 8-111 (Yasir), 9-178 (Azam)

Bowling: Steyn 13-1-66-1, Rabada 17-4-59-3 (1w), Olivier 14-3-37-6, Maharaj 3-1-10-0.