Beyers Swanepoel starred with bat and ball but South Africa A still found themselves in a difficult position after the penultimate day of the first four-day match against Sri Lanka A in Kimberley.
The seamer claimed 4-52 in 20.5 overs to first help the hosts bowl out the visitors for 323 – a lead of 49 – but they themselves then stumbled to 124 all out.
It could have been far worse but for Swanepoel top-scoring with 38 as Ishitha Wijesundara wreaked havoc with fine figures of 7-34. The South Africans did manage to claim a wicket late in the day when Sri Lanka faced 9.5 overs to reach 34-1 chasing 174 for victory.
But it left the home side with a big task on the final day to turn the tables.
At the start of day three, the visitors fell from 232-4 overnight to be bowled out for a further 91.
Swanepoel was excellent with his medium pace, with Prenelan Subrayen bagging 2-63. Sonal Dinusha (36) and Vishad Randika (35) were the key contributors for the visitors.
The second innings for the hosts began in the worst possible fashion after captain Neil Brand was out for a third-ball duck. Only Marques Ackerman (27) among the top order managed a meaningful contribution as they stumbled to 69-7.
A 45-run partnership between Swanepoel and Migael Pretorius (seven) at least allowed them to cross 100 and bolster the target to a defendable total.
By the close, though, Sri Lanka had reduced the target to 140 for the loss of key batsman Lahiru Udara for 26 as he fell to Codi Yusuf (1-8) with what proved to be the final ball of the day.
Photo: Danie van der Lith/Gallo Images