Centuries by Graeme Smith and Hashim Amla sent South Africa to a crazy eight-wicket win over Australia at Newlands on Friday after just two-and-a-half days of a Test in which it trailed by 188 runs.

Smith made 101 not out and Amla 112, sharing a 195-run partnership as South Africa reached its victory target of 236 for just two wickets before lunch on day three for a 1-0 lead in the series.

Australia’s bowlers took just one wicket on Friday on a pitch where it was skittled out for 47 in a game-changing collapse in its second innings on Thursday, its lowest score since the 19th century.

Smith and Amla restored sanity after a chaotic second day when 23 wickets fell, batting fluently to take South Africa to an absurd victory after it trailed by a big margin in the first innings just a day ago.

Inspired by 151 from captain Michael Clarke, Australia made 284 batting first and then blasted out South Africa for 96 for their 188-run lead.

But Australia responded by slumping to its worst batting score in Tests since 1896 and its fourth lowest total ever to see its dominant position in the match suddenly disintegrate in a heap of wickets on the second afternoon.

Australia also missed two crucial chances off Amla in the final stages of a traumatic Test for the Baggy Greens, dropping the right-hander off the last ball of the second day and again early on Friday when he was on 30, when Shane Watson spilled a regulation catch at first slip.

Amla made the most of his two lives to go on the attack.

He sent flashing drives through the covers for his 13th Test century and first against the Aussies, powering the Proteas to victory with 21 fours in a 134-ball innings.

He carved three straight boundaries off Ryan Harris the bowler who produced the two missed chances from Amla to race to three figures before edging a catch to Clarke in the gully off Mitchell Johnson with South Africa 14 short of victory.

Amla’s 195—run stand with Smith was a South African record second-wicket partnership against Australia, beating another mark that had stood for over 100 years in another slice of history in a Test which produced a string of records amid the madness on Thursday.

Smith saw South Africa home with his unbeaten hundred, and first test ton in a year, nudging a single through midwicket to complete a dramatic turnaround in a hectic Test that lasted barely two days but is set to be remembered for years.

More In: Sport | Cricket