South Africa staged a remarkable comeback to beat Pakistan by one run in the first day-night international in Sharjah on Wednesday, taking a 1-0 lead in the five-match series.
Pakistan bowled South Africa out for 183 and were cruising along nicely at 165-4 before losing their last six wickets for just 17 runs and were all out for 182 in 46.3 overs.
Wayne Parnell, who hit a career best 56 in South African innings, took 3-41 to anchor the South African fightback.
Saeed Ajmal took 4-30 while Shahid Afridi captured 3-37 as South Africa, who won the toss and batted, were bowled out in 49.5 overs.
For Pakistan opener Ahmed Shehzad scored 58 while skipper Misbah-ul Haq made 31 but the middle order collapsed.
Brief Scores: South Africa 183 in 49.5 overs (W. Parnell 56; Saeed Ajmal 4-30, Shahid Afridi 3-30), Pakistan 182 in 46.3 overs (Ahmed Shehzad 58; W.Parnell 3-41)