JOHANNESBURG (AP) — Captain AB de Villiers and Hashim Amla set a record stand for the third wicket as South Africa survived Shahid Afridi's later onslaught to win the third one-day international by 34 runs on Sunday.
The victory earned South Africa a 2-1 lead in the five-match series.
Afridi smashed five fours and seven sixes in a blistering knock of 88 off 48 balls before Pakistan was bowled out for 309 in 48.1 overs after centuries from de Villiers (128) and Amla (122) had led South Africa to 343-5.
De Villiers and Amla put on 238 off 182 balls to better the mark of 237 set by India's Rahul Dravid and Sachin Tendulkar against Kenya at Bristol during the 1999 World Cup.
"It's always nice to bat with Amla, he makes it easy for me, he rotates the strike very well," de Villiers said.
Afridi, who had not scored a half century for 13 months, struck form at last with some clean hitting after Pakistan was on the ropes at 5-132 midway to their run-chase.
Afridi got the run-chase back on track with a 71-run sixth wicket stand off 48 balls with captain Misbah-ul-Haq (28) and completed his half century off 31 balls. Afridi braved a severe pain on his right thumb soon after completing his half century while facing Dale Steyn's short pitched delivery.
"The way we played today, it showed we can be a good chasing side," Misbah said. "We know he (Afridi) can hit it a long way and when he came to bat and hit the first six, I told him, 'mate, you can score a hundred here.'"
Luck seemed to be on Afridi's side when, on 73, his off stump was knocked over by Ryan McLaren only to be recalled after television replays showed that the seamer had bowled a no-ball.
Afridi capitalized on the chance and smashed McLaren over the long off and the ball landed in the golf course.
South Africa finally heaved a sigh of relief in the 36th over when Afridi was caught in the deep by McLaren as he looked for another big hit off seamer Lonwabo Tsotsobe full toss delivery.
"I told the boys in a huddle: 'We cannot get ourselves down when a guy like Afridi is playing like this' and I'm proud of the way we fought back," de Villiers said.
Wahab Riaz, who earlier recorded Pakistan's worst ever bowling figures in an ODI with 2-93, made some amends with the bat by scoring 45 off 52 balls before he was the last man to be dismissed.
Pakistan started off confidently with Mohammad Hafeez (57) and Kamran Akmal (30) putting on 82 runs off 76 balls for the second wicket after Nasir Jamshed gave a regulation catch.
McLaren, who broke the threatening stand, was the pick of the bowlers with 3-56 while Tsotsobe got a bit of hammering from Afridi and returned with 3-74.
Earlier, de Villiers scored 128 off 108 balls with 12 fours and three sixes, while Amla hit 122 off 113 balls with nine fours and a six after South Africa was put in to bat.
Amla successfully used the television review to overturn an lbw decision before South Africa had scored, and he was dropped on 36 by Hafeez at point.
Mohammad Irfan took 2-34, while left-arm seamer Wahab Riaz, playing his first ODI in a year, was hammered for 93 runs for the wickets of Amla and Faf du Plessis.
Misbah's decision to field first looked on track when 2.16 meter (7-foot-1) Irfan removed Graeme Smith (3) and Colin Ingram (17) as South Africa struggeld to 42-2 in the 14th over.
But once the spinners came on, along with Riaz, Amla and de Villiers scored at will.
Amla scored his 11th ODI century and second against Pakistan off 99 balls with a single to midwicket off Hafeez in the 39th over. De Villiers completed his 14th hundred off 87 balls in more attractive fashion, cutting Afridi to the point boundary.
Amla was out soon after breaking the world record in the 45th over, caught by Misbah to give some relief to Riaz. De Villiers was caught in the deep by Shoaib Malik in the 47th over off Saeed Ajmal, who took 1-62.
Pakistan badly missed Irfan in the later stages with the lanky fast bowler falling ill and having to leave the field after bowling only seven overs in two spells.
Faf du Plessis rubbed more salt into the wounds of Pakistan by hitting an entertaining knock of 45 off 19 balls with four boundaries and three sixes, including two fours and two sixes in one of Riaz's overs.
South Africa's team wore a unique pink uniform in support of breast cancer awareness, while Pakistan's players also wore pink ribbons on their chest.
The fourth match of the series will be played at Durban on Thursday before the series winds up at Benoni next Sunday.