Tristan Stubbs struck a superb hundred for South Africa A on day two of the second four-day match against Sri Lanka A in Colombo.
Stubbs scored 117 off 181 balls (15 fours, one six) before being trapped lbw by Vishwa Fernando.
The Proteas batsman was involved in key partnerships with Keegan Petersen (50) and Zubayr Hamza (46) as the visitors recovered from 15-2 following the loss of captain Tony de Zorzi for a first-ball duck and Matthew Breetzke for 10.
SA A were 287-6 at stumps, with Kyle Verreynne unbeaten on 34.
Earlier, spinner Senuran Muthusamy took 6-101 – his third consecutive five-for in the series – as the hosts were bowled out for 290.
Sri Lanka A won the first match in Pallekele by 160 runs.