DURBAN - Aiden Markram led a stirring South African fightback but could not prevent Australia from closing in on victory on the fourth day of the first Test at Kingsmead on Sunday.

Opening batsman Markram made 143 but South Africa were hanging on at 293 for nine, still 124 runs short of a target of 417, when bad light stopped play. South Africa were in desperate trouble at 49 for four but Markram shared stands of 87 with Theunis de Bruyn (36) and 147 with Quinton de Kock (81 not out) which gave South Africa hope that they could pull off a miracle victory.

His dismissal, though, opened the door for Australia to rip through the tail. Mitchell Starc took three wickets in five balls to have South Africa nine down. That caused the umpires to tell Australian captain Steve Smith that play could only continue if he used slow bowlers. De Kock and Morne Morkel survived nine overs in ever-deteriorating light against Smith and Nathan Lyon before the umpires took the players off five minutes before the scheduled close.

That South Africa would even entertain faint hopes of victory seemed impossible when their four most senior batsmen were dismissed without reaching double figures.

But Markram, in only his seventh Test, remained calm amid the carnage. The recovery started with a determined partnership for the fifth wicket with De Bruyn, who made a stylish 36 before he was caught behind off Josh Hazlewood. It was the only wicket to fall between lunch and tea.

Markram was joined by De Kock, whose form leading into the Test had been dismal. But the left-handed wicketkeeper looked in good touch from the start and took the fight to the Australians. It was Markram's third Test century but easily his important innings. He made hundreds against Bangladesh and Zimbabwe, two of cricket's lesser powers, earlier in the season. He showed good composure, a sound technique and some elegant off side drives in a 218-ball innings which included 19 boundaries.

The damage was done before lunch when Dean Elgar, Hashim Amla, AB de Villiers and captain Faf du Plessis all fell cheaply. Markram and Elgar put on 29 for the first wicket before Elgar edged a sharply lifting delivery from Starc to wicketkeeper Tim Paine to be out for nine.

Amla avoided a pair but only made eight before he was leg before wicket to Hazlewood. South Africa then suffered a hammer blow when De Villiers, their top scorer in the first innings, was run out for nought.

Markram turned a ball from off-spinner Nathan Lyon behind square leg and did not respond when De Villiers called him through for a run. De Villiers had to turn and tried to go back but could not beat David Warner's throw to Lyon. Pat Cummins struck with his third ball of the innings when he beat Du Plessis for pace and flattened his off stump.

Scoreboard

AUSTRALIA 1ST INNINGS: 351

SOUTH AFRICA 1ST INNINGS: 162

AUSTRALIA 2ND INNINGS:

(OVERNIGHT: 213-9):

C Bancroft st De Kock b Maharaj        53

D Warner c sub b Rabada        28

U Khawaja c De Kock b Maharaj        6

S Smith lbw b Elgar      38

S Marsh c De Villiers b Morkel            33

M Marsh c Amla b Rabada      6

T Paine c De Villiers b Maharaj            14

P Cummins b Maharaj  26

M Starc c Elgar b Morkel         7

N Lyon c Amla b Morkel         2

J Hazlewood not out     9

EXTRAS: (lb5)            5

TOTAL: (all out; 74.4 overs)    227

FOW: 1-56, 2-71, 3-108, 4-146, 5-156, 6-175, 7-185, 8-203, 9-209

BOWLING: Morkel 15-4-47-3, Philander 14-4-35-0, Maharaj 29.4-4-102-4, Rabada 13-6-28-2, Elgar 3-1-10-1

SOUTH AFRICA 2ND INNINGS:

A Markram c Paine b M Marsh            143

D Elgar c Paine b Starc 9

H Amla lbw b Hazlewood         8

A de Villiers run out      0

F du Plessis b Cummins            4

T de Bruyn c Paine b Hazlewood          36

Q de Kock not out       81

V Philander c Paine b Starc      6

K Maharaj b Starc       0

K Rabada b Starc        0

M Morkel not out         0

EXTRAS: (b2, lb3, nb1)           6

TOTAL: (9 wkts, 89 overs)      293

FOW: 1-29, 2-39, 3-39, 4-49, 5-136, 6-283, 7-290, 8-290, 9-290

BOWLING: Starc 16-1-74-4 (1nb), Hazlewood 14-1-57-2, Lyon 32-7-86-0, Cummins 15-3-47-1, M. Marsh 7-2-21-1, Smith 5-3-3-0

TOSS: Australia

UMPIRES: Kumar Dharmasena (SRI), Sunderam Ravi (IND)

TV UMPIRE: Chris Gaffaney (NZL)

MATCH REFEREE: Jeff Crowe (NZL)