The first cricket test in Brisbane is heading for a draw in all likelihood, after a match-saving 259-run fourth wicket partnership between Australia's Ed Cowan and his skipper Michael Clarke.
Cowan reached his maiden test century on the fourth day, then South Africa ran him out for 136 before tea at the Gabba.
Clarke's still there late in the day on 147 with Mike Hussey on 40.
Australia's 370 for four, trailing the Proteas by 80.
Both sides are still to bat again.
Cowan and Clarke had come together with Australia in deep trouble at 40 for three late on Sunday in reply to South Africa's 450.