Amla (122) and De Villiers (128) shared a world record third wicket partnership of 238 as South Africa made 343 for five after being sent in.
Pakistan, who were bowled out for 309 to slip 2-1 down in the series, had been in deep trouble when Afridi walked in at 132 for five but he gave his side hope as he thrashed 88 off 48 balls with seven sixes and five fours.
Afridi's innings included some of the biggest sixes seen at the Wanderers.
One, after he had been bowled off a no-ball, was a mighty hit onto the roof of the four-tier Centenary stand which was last seen bouncing towards an adjacent golf course.
"He can hit it a long way," said Pakistan captain Misbahul Haq.
"We just backed Afridi and he played tremendously. When he hit his first six I told him he could get a century here."
Afridi was yorked by Ryan McLaren when he had 73 but a check requested by umpire Billy Bowden showed the bowler had over-stepped.
McLaren then bowled a wide, which meant Afridi still had a free hit to which he committed all his power.
There was one more six before he hit a full toss from Lonwabo Tsotsobe to McLaren at long-off.
There was still a possibility of a reprieve as the umpires checked whether the full toss was above waist height, which would have meant another no-ball, before confirming the dismissal.
Amla and De Villiers batted superbly after South Africa struggled early on, with left-arm fast bowler Mohammad Irfan taking two early wickets.
They beat by one run the previous one-day international third wicket record set by Rahul Dravid and Sachin Tendulkar for India against Kenya in 1999, to ensure that Pakistan would have a challenging run chase on a ground renowned for high scoring.
De Villiers was quickly into his stride and the pair posted a fifty partnership off 38 balls.
The rate slowed slightly when Pakistan brought their spin bowlers into action.
After 35 overs the total was 115 but the runs came in a torrent towards the end of the innings. The last 15 overs yielded 156 runs.
Amla and De Villiers shared the man of the match award and both deflected praise to their partner.
"Hashim makes it easy for me, he rotates the strike very well," said De Villiers.
Amla said De Villiers had played a "fantastic" knock.
He said of a backfoot six over cover by the captain: "He's got a new MCC manual to develop all by himself."
Amla reached his 11th one-day international century off 99 balls, while De Villiers went to his 14th century in the format off 87 deliveries.
Amla was caught at cover for 122 off 113 balls with nine fours and a six and De Villiers was held at deep midwicket for 128 off 108 deliveries, with 12 fours and three sixes.
Misbah said the one-day international fielding restrictions made it difficult to stop two batsmen when they were set in a big partnership.
"It's difficult to control them, there was no spin, no seam, nothing."
Pakistan were briefly reduced to 10 men after Irfan, who had been a doubtful starter because of a hamstring strain, left the field for treatment.
He was replaced by Umar Akmal but after 20 minutes the umpires informed Pakistan captain Misbahul Haq that the maximum 20 minutes allowed for treatment had expired. Pakistan had a fielder short for two overs before Irfan returned.
Wahab Riaz conceded 93 runs in his 10 overs -- the most by a Pakistan bowler in one-day internationals. He took two wickets.
COMMENTS (28)
Comments are moderated and generally will be posted if they are on-topic and not abusive.
For more information, please see our Comments FAQ
afridi is spent force no use kick him out let the youngster who is really 16 year come in. AFridi had been 16 since i was 16 now i am 28 but he is still 16
Please get rid of Kamran Akmal , he is dropping catches and costing us games. That Amla catch should have been taken. Just pathetic keeping by Akmal. If he takes that catch the final score would be much less.
RAZZAQ needs to return, better than Umar Akmal, Wahab Riaz, Malik, and shahid afridi
Please RAZZAQ Come back
Afridi doesn't perform = Blame Afridi for the loss Afridi performs = Blame Afridi for the loss
What do you guys want from Afridi? It's not a one man show, it's a team effort. Why didn't the other batsman besides Hafeez make runs?
Sorry guys but we lost the match coz of Afridi alone. Yes! After his fireworks he should have finished the match. But instead he threw his wicket away, like he has done on so many occassions in the past.
Afridi is our star. Always has something to offer the fans.
You should select Abdul Razzaq in fast pitches like SA, Australia, England and New Zealand who can bowl and bat at # 8. Razzaq's bowling performance would be better than medium pacer like wahab etc. Razzaq should be selected in coming series and specially 2015 World Cup
@Ch. Allah Daad: Well dont you see other useless players being kept in our team? I fully support Afridi he's an all rounder- he has the ability to change the game and proven that in the past- We should be hoping for the best - Disappointed to see many recommendations to @ Ch Daad comments above...
Do not overlook the fact that Pakistan still fielded the worst wicket keeper in international cricket.
Well played Afridi, now can you please retire !!! Help us god.
I read on tribune somewhere that Kamran Akmal was very confident before the ODI tour, get rid of that liability- cricketers stop giving such cliche statements, and please no more Misbah, Malik or even Younis Khan. Time to groom new talent!
After several dozen failures we are thrilled in yet another defeat just because Lala scored runs like AB and Amla do every now and then. Take a lesson from India. They dropped a giant Sehwag and also Gambhir. They got two much better players. Pakistan team is based upon the same group of players like Akmal, Afridi, Malik and even now Younus. These score a half century after a dozen failures and we become happy. Afridi's averages are terrible compared to the dropped players. His number of wickets are high but not per match. Let us continue with these and there would be glimpses of brilliance once in a while.
Why do people still have an issue with Afridi?? Come on now.... What he has done in today's breathtaking match was for his team after all. Boom boom is back again and that what gives me immense relief and happiness !! ... no matter we lost it but the chase is worth appreciating !! Loved the no ball and the free hit!
Why so negative on Afridi, folks. He gave Pakistani fans hope, once the top order had fallen as usual. So he's not supposed to look happy, he plays for his place in the team, we have to put up with more of him, come on, lets be a little generous. If that's all we've go against him, then Go Afridi!
no doubt afridi made us happy ,but still fainted for loss..after such a assaulting hitting by bookm boom :(
Looks like the winner of each South African ODI is going to be largely predetermined by the state of the wicket. If its a wicket suited for batting then SA is likely to romp through for a win. And, if it turns out to be a pitch favouring the bowlers - like the one at Bloemfontein - then Pakistan have a good chance of turning the tide. Today, due to Afridi's unusually bravo performance Pakistan was saved from the ignominy of a big defeat and made it a match worth watching. Though Wahab Riaz failed at bowling his score of 45 helped the team save much needed face. For cricket lovers the fireworks produced by Amla and De Villiers were a sight and a half.
Afridi is not a team player .He plays as an individual.We have to accept that. probably the most entertaining of them all,when he is in his elements. I am not a huge fan of him. but he sure is exciting and entertaining.Today in a losing cause he sure provided some relief.
Why is Razzaq not in the squad? Are the PCB selectors blind?? Had Razzaq been there with Afridi, we would have got the 34 runs and won the match. Razzaq picks up wickets aswell
@Imtiaz Hamid an Indian ----saw the match and during hand-shaking after the match,afridi looked so happy as if he had won the match...sometimes it feels he plays for his place only.
So the pink uniform had no adverse affect on Proteas performance :-)
Good news is that Afridi scored runs but bad news is that he will ride our nerves for another hundred matches.
Once this series is over,one needs to do review of cricket,passion of Pakistanis everywhere,start with the structure of the board selection process and. selectors coaches captain and players. cut the dead wood, let young talent find its appropriate palace. perhaps we will find that we do not have as much talent as we like to believe. let the truth emerge and all of us will have to accept bitter truth, there is scarcity of talent at the player and definitely at the leadership level.
Oh the horror!
I suppose it is futile to expect any radical change in thought process. Only other person who could pick up the run rate is Afridi. But he will keep him for no 7. when it is futile.
Oh what an awful performance by bowlers. Doubt about captaincy are too numerous to mention Let us see if change the batting line up to suit the challenge. May be put Afridi and Karan earlier than others. But I doubt it.Let us see what this team is made oo.