South Africa managed to recover from two significant defeats to secure a seven-wicket victory against Afghanistan in the final match of their One Day International Series held in Sharjah on Sunday.

Aiden Markram's unbeaten 69 and Tristan Stubbs' 26 not out helped South Africa reach 170 for three wickets in just 33 overs, in response to Afghanistan's modest total of 169.

Afghanistan had previously dominated South Africa, winning the first match on Wednesday and delivering a crushing 177-run defeat on Friday. However, they were unable to maintain their momentum, even after winning the toss and choosing to bat first in the third ODI.

Their innings was once again highlighted by the aggressive batting of opener Rahmanullah Gurbaz, who scored 105 in Friday's victory. This time, he fell short of another century, scoring 89 off 94 balls before being caught by Reeza Hendricks off Andile Phehlukwayo's bowling.

For the rest of the team, poor decision-making and some misfortune led to three runouts. Rahmat Shah was run out when a ball hit by Gurbaz was deflected by Lungi Ngidi onto Shah's wicket. Captain Hashmatullah Shahidi and Ikram Alikhil were also run out due to quick thinking in the field, causing Afghanistan to slump to 132 for seven before Allah Ghazanfar's unbeaten 31 off 15 helped them surpass 150.

South Africa remained on track to reach the target, even after losing their first three batsmen for 80 runs. Markram took the lead with Stubbs providing support, resulting in an unbeaten 90-run partnership that secured the victory for South Africa.