Pakistan on Sunday set South Africa a 309-run target in final one-day international (ODI) at Wanderers Stadium, Sandton.
Opening batter Saim Ayub lit up the stadium with a scintillating century, guiding Pakistan to 308/9 against South Africa in a rain-affected final OCI clash.
The match, delayed due to rain, was reduced to 47 overs per side, adding an extra layer of challenge for both teams.
After being asked to bat, Pakistan faced early challenges, but Ayub's commanding knock proved instrumental in building a defendable target.
Shafique registered his third consecutive duck of the series, falling for a golden duck on the second delivery of the match.
Babar Azam and Saim Ayub steadied the ship with a vital 114-run partnership for the second wicket.
Babar contributed a measured 52 off 71 balls, including seven boundaries, before being dismissed by Lutho Maphaka in the 23rd over, leaving Pakistan at 115/2.
Ayub continued to shine, crafting a brilliant 101 off 94 deliveries, including 13 boundaries and two sixes.
This marked his third ODI century and his second of the series. Ayub's dismissal in the 35th over at 208/3 triggered a brief collapse, with Kamran Ghulam falling for a golden duck in the very next over.
Despite the setbacks, Mohammad Rizwan and Salman Ali Agha kept the momentum alive.
Rizwan notched his 15th ODI half-century, scoring 53 off 52 balls, while Agha played a crucial knock, smashing 48 runs off 32 balls, including three boundaries and two sixes, before falling just short of a fifty.
Shaheen Afridi became the third batter in the lineup to be dismissed for a duck, leaving Pakistan at 297/7 in 46 overs.
In the final over, Pakistan lost two more wickets as set batter Tayyab Tahir (28) and Mohammad Hasnain (4) were dismissed by Marco Jansen.
Naseem Shah struck a boundary off his very first delivery and took a single off the final ball, helping Pakistan finish their innings at 308/9 in 50 overs.
With the ball, Kagiso Rabada led the attack, taking 3/56 in his 10-over spell.
He was supported by Bjorn Fortuin and Marco Jansen, who picked up two wickets each, while Kwena Maphaka and Corbin Bosch claimed one wicket apiece.
Pakistan: Saim Ayub, Abdullah Shafique, Babar Azam, Mohammad Rizwan(w/c), Kamran Ghulam, Salman Agha, Tayyab Tahir, Shaheen Afridi, Naseem Shah, Mohammad Hasnain, Sufiyan Muqeem
South Africa: Tony de Zorzi, Temba Bavuma(c), Rassie van der Dussen, Aiden Markram, Heinrich Klaasen(w), David Miller, Marco Jansen, Corbin Bosch, Bjorn Fortuin, Kagiso Rabada, Kwena Maphaka
"Cricket is a sport loved by millions, and we believe it should remain free from politics," says Mohsin Naqvi
After winning Intercontinental Cup, Real Madrid host Sevilla in La Liga on Sunday in their final game of year
Khyber Pakhtunkhwa secures 90 medals followed by Sindh and Balochistan
Pacer Maphaka and all-rounder Bosch make it to 16-member Proteas squad for Tests starting from Dec 26
Mahnoor Ali and Harmas Raja clinch at US Junior Open Squash Championships
"I must say, I created a lot of memories alongside Rohit and several of my other teammates," says cricketer