AB de Villiers and Herschelle Gibbs smashed centuries to help South Africa beat Pakistan by 45 runs in the first day-night international at the Gaddafi Stadium on Thursday.
De Villiers notched a brisk unbeaten 95-ball 103, while Gibbs scored 102 to propel the tourists to 294-5 in 50 overs before paceman Makhaya Ntini restricted Pakistan to 249 in 46.3 overs.
The victory gives South Africa a 1-0 lead in the five-match series. The second match will be played here on Saturday.
Mohammad Yousuf top-scored for Pakistan with 53 and Shahid Afridi hit a rapid 26-ball 47 with five boundaries and two sixes. But it was not enough after Ntini grabbed 4-69 to derail the run chase.
The 30-year-old paceman destroyed the top order in a fiery burst, removing Imran Nazir (16), Younis Khan (12) and Mohammad Hafeez (six) to reduce the home team to 37-3.
Ntini had Nazir caught at short cover in his second over, then forced an edge off Younis in the third before accounting for Hafeez, caught hooking, in his fourth.
Younis hit two boundaries to complete 4,000 runs in limited overs cricket.
Shoaib Malik hit Ntini for three boundaries in his fifth over before the paceman struck back, dismissing the Pakistan captain off a miscued flick for 18.
Yousuf and Misbah-ul Haq (20) then added 37 for the fifth wicket before Charl Langeveldt removed Haq to leave Pakistan struggling at 92-5.
Yousuf found an able ally in Kamran Akmal (35) as they added 60 for the sixth wicket before Jacques Kallis removed both in quick succession.
Afridi and debutant Sohail Tanveer added a quickfire 43 off 25 balls for the eighth wicket but their efforts only served to entertain the 28,000-strong crowd.
Tanveer was bowled in the 43rd over, while Afridi holed out in the 46th to end any hopes of a win.
Earlier, De Villiers and Gibbs shared a 137-run stand for the third wicket and took full advantage of a depleted Pakistan attack missing paceman Mohammad Asif, who had failed to recover from an elbow injury.
Gibbs hit 11 boundaries and a six during his aggressive 128-ball knock while de Villiers upped the tempo in the last five overs, hitting nine boundaries and three sixes in his innings.
De Villiers went on the rampage after Gibbs was run out, hitting two sixes and two fours in one Sohail Tanveer over to enter the 90s. He then hit a six and a boundary to reach his third one-day hundred off 93-balls.
Gibbs, with skipper Graeme Smith (34) gave the tourists a solid start of 85 for the first wicket after they won the toss and decided to bat.
Confusion between Smith and Gibbs gave Pakistan the breakthrough when the South African captain failed to beat a throw from square-leg after he was refused a second run by his fellow opener.
Kallis, who made 421 runs during South Africa's 1-0 win in the two-Test series over Pakistan, made only eight before giving a return catch to leg-spinner Afridi.