South Africa won the final one-day international by four wickets to restore some pride Saturday after losing its first ever ODI series to Pakistan.

South Africa’s comfortable victory at SuperSport Park avoided an historic first whitewash in an ODI series at home by the Proteas, but Pakistan still leaves with its first series win over South Africa anywhere, taking the three-match series 2-1.

Captain AB de Villiers finished 48 not out in South Africa’s 181-6 in the final game as the Proteas successfully overhauled Pakistan’s 179 all out with more than 11 overs to spare. Opener Hashim Amla made 41. Offspinner Saeed Ajmal took 2-36 for Pakistan’s best bowling performance.

The first win in four games gave South Africa some respite, although Pakistan still made its short-notice tour of South Africa an historic one.

After opting to bowl first, South Africa’s seamers ran through Pakistan to dismiss the tourists for 179 in 46.5 overs in Centurion. Vernon Philander took 3-26 to lead South Africa’s pace attack in place of the injured Dale Steyn while Misbah-ul-Haq’s 79 not out was the only significant contribution by Pakistan’s batsmen.

Opener Umar Amin scored 25, Sohaib Maqsood also had 25 and Misbah and Abdur Rehman (22) shared a 51-run stand for the eighth wicket but South Africa was on top throughout in the last game despite missing main strike bowler Steyn, allrounder Jacques Kallis and opening batsman Graeme Smith.

Pakistan also rested four players, including allrounder Shahid Afridi, after sealing the series on Wednesday.

Philander removed Ahmed Shehzad for a duck in the first over and Tsotsobe (2-38) struck in the fourth to leave Pakistan 7-2. Philander returned to remove Anwar Ali as Pakistan slumped to 97-7 before Misbah and Rehman partially rescued the innings. Pakistan was still bowled out with over three overs of its innings remaining.

South Africa appeared to be cruising home until Amla was run out in the 16th over to make it 75-3. JP Duminy (16) and David Miller (24) also fell after getting starts but skipper De Villiers guided the Proteas home with three fours in his measured 48 from 63 balls.

India is due to arrive in South Africa on Monday for three one-day games and a two-match test series.

More In: Cricket | Sport