Australia 181 for 4 (Smith 44, Tahir 2-38) beat South Africa 178 for 4 (Amla 97*, Coulter-Nile 2-36) by six wickets
Live Scorecard and ball-by-ball details

Hashim Amla's career-best 97 not out was not enough for South Africa to secure a series victory as Australia squeezed with spin and then attacked the opposition's slower bowlers to claim a 2-1 win in the T20I decider at Newlands.

The result means that the same puzzle that has faced South Africa all summer remains unsolved. Their middle-order is still missing some reliability and they have yet to decide who to anoint as their fifth bowler.

Australia, on the other hand, have answered some of their own questions. They found an opening combination that worked, their captain contributed a vital innings, and they were successful against spin on a surface that South Africa had asked to resemble a sub-continent strip as far as possible.

While run-scoring had stuttered during the women's match that preceded this one, Quinton de Kock and Hashim Amla scotched any notions of sluggish track with fluency from the outset. In AB de Villiers' absence, both seemed eager to impress for the opening spot in India and took turns taking the initiative.

De Kock opened with two finesse-laced flicks off Nathan Coulter-Nile, whose line was initially too straight. Amla responded with impressive footwork to send Shane Watson to opposite ends of the ground. South Africa raced to 47 after four overs and were threatening to run away with it when de Kock threw his bat at a full delivery and John Hastings took a smart catch at third man.

That only seemed to spur Amla on even more. He unleashed a powerful pull to Coulter-Nile's next ball and then got away with a top edge that carried for six to force another bowling change. James Faulkner was the fourth bowler used in the Powerplay and Amla drilled him for back-to-back boundaries to take South Africa to the second highest total in the six-over period at Newlands, 68 for 1.

Adam Zampa came on immediately after the fielding restrictions were lifted and bowled the first boundary-free over the innings. That meant Faf du Plessis had not got in on the action at all and, in his haste to join in, he misread a Watson slower ball and spooned a catch to short mid-wicket.

While Amla bided his time, Rilee Rossouw was kept quiet by Zampa and Glenn Maxwell - and Zampa should have had him caught on the mid-wicket boundary when he was on three only for Maxwell to spill the catch. Amla reached his fifty off 31 balls and seemed content to rotate the strike during the squeeze.

In the five overs that followed the Powerplay, Australia conceded just 25 runs to put the onus back on Amla to get things going. He took on Zampa and Maxwell, finding a boundary in each of their next overs. When Rossouw tried to do the same off Coulter-Nile, he failed, gifting a catch to Steve Smith at long-off.

South Africa promoted David Miller above JP Duminy and his quick-fire 30 took the pressure off Amla. It also denied him a century. Amla entered the final over on 84, hit a six off the first ball and then took a single to put Miller on strike. Miller ran two and then sent a full toss to cover but did not run to leave Amla off strike. Amla duly struck the last ball of the innings for six but had to settle for 97 not out.

In the end, South Africa had needed a little more than just those three runs. The Sydney team-mates, Usman Khawaja and Shane Watson, got Australia off to a solid start before Steve Smith and David Warner guided them to the finish.

Australia's openers took on the short ball which Dale Steyn, Kagiso Rabada and Kyle Abbott were all generous in serving up. Although Australia's Powerplay was not as explosive as South Africa's - they scored 51 runs in the six overs - it set them up. Australia changed tack when the fielding restrictions were lifted and targeted the spin instead, with good results and a touch of luck.

Watson dispatched Imran Tahir's second ball over mid-wicket but, when he tried to hit him down the ground, Watson should have been caught. David Miller at long-off spilled the chance. Watson was not deterred by that and sent the last ball of that over into the stands.

The plan continued into Tahir's next over, when Watson tried to go straight down the ground again. He should have been caught again off the first ball but, between Miller at long-off du Plessis at cover, they could not decide who should take it. He was caught off the next ball, however, playing the same shot, and Tahir struck again in the same over when Khawaja joined in on the strategy. He tried a sweep but got as far as Amla at deep square-leg.

South Africa worked their way back into contention but instead of turn to a strike bowler, du Plessis brought Duminy on. Australia paid him some respect at first - Smith instead turned his attention to Tahir, hitting him for the straightest six of the match, before taking on Duminy as well.

Steyn was brought back on to try and break the partnership but Smith and Warner were seeing the ball too well. Warner was particularly severe on Wiese, whose pace off the ball approach did not work, and with 47 needed from the last six overs, the sting was taken out of the contest.

Neither Smith nor Warner hung around to finish but they'd done enough. Maxwell whittled the requirements down to 12 off 12 and Mitchell Marsh hit the winning runs with four balls to spare.

Firdose Moonda is ESPNcricinfo's South Africa correspondent