Chasing 274, Pakistan got the job done in the final delivery of their innings with with three wickets to spare.
Babar was instrumental for the visitors early on.
Here we look at his ODI numbers.
SA vs PAK: How did the first ODI pan out?
SA were off to a shaky start (55/4) after Pakistan elected field.
However, van der Dussen (123*) and David Miller (50) powered SA to 273/6 in 50 overs.
Meanwhile, Pakistan remained in commanding position until a spell from Anrich Nortje brought them back.
Although the match came down to the wire despite Babar's ton, Pakistan held their nerves to chase 274.
13 tons: Babar becomes quickest to reach 13 ODI centuries
The sensational Babar played a terrific knock under pressure after Fakhar Zaman got dismissed early on.
However, he looked in fine touch, and gave an exhibition of immaculate timing.
Babar went on to complete his 13th ODI ton (103) in his 76th ODI innings, the quickest to the feat.
The previous record was held by former South African batsman Hashim Amla (83 innings).
Babar ODIs: Babar has an average of 56.66 in ODI cricket
In 78 ODIs, Babar has racked up 3,683 runs at an average of 56.66.
He now has 13 centuries and 16 fifties under his belt with a best of 125*.
He has also slammed 329 fours and 34 sixes.
Against SA, Babar has played eight games, accumulating 398 runs at 66.33.
He slammed his maiden ton against the Proteas.
Feats: Babar holds these feats in ODI cricket
Babar is the third-fastest to 3,000 ODI runs (68 innings) and the fourth-fastest to 2,000 ODI runs (45 innings).
Notably, he is the seventh-fastest to 1,000 ODI runs (21 innings).
Babar ended as the leading ODI run-scorer for Pakistan in 2016, 2017, and 2019 respectively.
He was named in the ICC ODI Team of the Year in 2017 and 2019.
Fact: Babar in line to surpass Imran and Akram
Babar needs 27 runs to get past former Pakistan skipper Imran Khan (3,709) and 35 to surpass Wasim Akram (3,717) in terms of career ODI runs. Babar (76 innings) can become the fastest to 4,000 ODI runs. Amla leads the show (81 innings).
Babar Azam breaks Virat Kohli, Hashim Amla's record, becomes fastest to 13 ODI centuries
Pakistan captain Babar Azam's 13th ODI hundred guided Pakistan to three-wicket victory over South Africa in the first one-day international on Friday. In the process, Babar became the fastest men's international cricketer to score 13 ODI hundreds, going past the likes of other great players such as Virat Kohli and Hashim Amla.