Veteran batsman Amla's father is critically ill, Proteas team manager Mohammed Moosajee confirmed in a statement.
Veteran batsman Hashim Amla has pulled out of the South African One-Day International squad to play Sri Lanka for family reasons, granting a reprieve for opener Reeza Hendricks who had been dropped for the final two matches of the series.
"Hashim has asked to be excused from the last two ODIs of the current series on compassionate grounds since his father is critically ill," Proteas team manager Mohammed Moosajee confirmed in a statement on Tuesday.
Hendricks played as an opener in the first three games of the series, all won by South Africa, but managed scores of only 1, 29 and 4, dealing a blow to his chances of making the squad for the World Cup in England and Wales starting in late May.
The experienced Amla, 35, is seen as a certainty to travel to the global showpiece tournament, but had been rested for the start of the series to allow Hendricks to stake his claim.
The fourth ODI will be played in Port Elizabeth on Wednesday.