Upul Tharanga made a second straight half-century on Tuesday to help Sri Lanka post 266-9 in a must-win match to keep the one-day series against South Africa alive.
Tharanga made 58 off 65 balls in a 94-run opening stand with Tillakaratne Dilshan (33) in the third ODI at Chevrolet Park. Kumar Sangakkara (38), Dinesh Chandimal (36) and Nuwan Kulasekara (40) also contributed.
None of the top-order batsmen converted promising starts into big scores but the tourists still set a competitive total.
Sri Lanka trails 2-0 in the five-game contest.
Tharanga hit five fours and two sixes before falling to spinner Robin Peterson. Morne Morkel claimed 2-65 for the Proteas.