Dimuth Karunaratne ploughed a lone furrow for Sri Lanka as South Africa took charge on the opening day of the first Test in Galle.
The opener carried his bat on Thursday as the hosts struggled to find any rhythm after opting to make their opponents bowl, Karunaratne finishing 158 not out as Sri Lanka were dismissed for 287.
Plenty of his partners made starts but could not push on, and Sri Lanka's total would have been even less competitive had last man Lakshan Sandakan not added a timely 25.
Kagiso Rabada proved South Africa's main threat with 4-50, while there was also a wicket for the returning Dale Steyn.
Left-arm chinaman Tabraiz Shamsi contributed 3-91 in his second outing as Sri Lanka toiled, only the impressive Karunaratne scoring big on a pitch that is expected to turn more and more as the game goes on.
Sri Lanka finished the day on a high, though, as Rangana Herath took advantage of the early spin to remove Aiden Markram before the close, South Africa finishing 4-1 at the beginning of their reply.
Stumps, Day 1: SA 4/1 after 4 overs. Elgar 4*, Maharaj 0*, trail by 283. Last wicket: Markram 0.— Cricket South Africa (@OfficialCSA) July 12, 2018
SL 287. Rabada 4/50, Shamsi 3/91, Philander 1/28, Steyn 1/54. #SLvSA #ProteaFire pic.twitter.com/r6uPlFI142
The initial signs looked positive for Sri Lanka as Karunaratne and Danushka Gunathilaka made a steady start, only for Rabada to find a beautiful line outside off stump to have the latter caught behind.
Dhananjaya de Silva helped push the score on to 70-1 but four quick wickets saw the hosts slump to 119-5 – Rabada and Steyn doing the damage as the Proteas' seamers found a good length.
Karunaratne kept his patient, watchful innings ticking over while panic ensued around him, bringing up his half century off 82 balls with a quick single.
He survived a scare soon after as Markram dropped him at short leg, and slowly pushed towards an eighth Test century.
A straight drive to the boundary off Shamsi took Karunaratne to three figures but by then Sri Lanka were eight wickets down and facing an uphill struggle to post a credible total.
The Karunaratne show! @IamDimuth carries his bat with 158*, the fourth Sri Lankan to do so in Test cricket, as the hosts are dismissed for 287 on day one in Galle.#SLvSA scorecard https://t.co/iKZgIHlw9a pic.twitter.com/XdTawzE1Hg— ICC (@ICC) July 12, 2018
Stand-in captain Suranga Lakmal and Sandakan gave him much-needed support for the final two wickets, Sri Lanka adding 63 as Karunaratne reached 150 for the fourth time in his career.
Eventually Sri Lanka's resistance came to an end as Shamsi had Sandakan stumped, but it left South Africa with a tricky four-over spell to navigate.
Markram was unable to do so as Herath drew him forward and found an edge that Angelo Matthews gobbled up at slip, but it was a rare disappointment on a productive day for the tourists.
|QPR 0 Norwich City 1: Pukki hits winner as hot streak continues|
|Nuno proud of Wolves character in Man United draw|
|Playing for England my dream, says in-form Maddison|
|Brighton and Hove Albion 1 Tottenham 2: Kane on target as Spurs issue firm response|
|Schalke 0 Bayern Munich 2: James and Lewandowski deliver another win|
|Getafe 0 Atletico Madrid 2: Lemar inspires routine win|
|Championship Review: Monk ruins Leeds´ unbeaten streak, McGinn screamer fails to save Villa|
|Bale benched for Real Madrid-Espanyol|
|Biggar fails to rescue Saints at Bath, Bristol and Wasps win|
|Zaha affected by back injury – Hodgson|
|Mourinho slams Manchester United attitude after Wolves stalemate|
|Herbert holds Portugal Masters advantage|
|Warnock blasts ´elementary´ Cardiff mistakes|
|Shaqiri substitution not easy for Klopp|
|Guardiola hopes for even more to come from Aguero|
|Fellaini accepts United closing gap to Premier League summit will be difficult|
|Klizan to face Thiem in St. Petersburg final, Bachinger shocks Nishikori|
|Klopp: Van Dijk injury not serious|
|Mourinho annoyed by Man Utd´s blunt attack in Wolves draw|
|Valverde not ready to consider Barca contract extension|
|Gattuso wary of wounded Atalanta as Higuain receives further advice|
|Burnley 4 Bournemouth 0: Rampant Clarets claim first Premier League win of the season|
|Crystal Palace 0 Newcastle United 0: Sakho misses sitter as Magpies remain winless|
|Cardiff City 0 Manchester City 5: Aguero celebrates new deal with goal in 300th game|
|Leicester City 3 Huddersfield Town 1: Comeback win eases pressure on Puel|
|Liverpool 3 Southampton 0: Salah ends goalless run as Reds make best Premier League start|
|Manchester United 1 Wolves 1: Moutinho stunner sees Red Devils falter at home again|
|Rashid, Hasan and Asghar fined by ICC|
|Barnsley game postponed after medical emergency|
|Johnny Manziel sacked five times in ugly CFL loss|
|Fosu-Mensah says sorry for tackle on Deeney|
|Kluivert to get Roma chance as Di Francesco demands focus|
|Robinson optimistic injured Cronk will be fit for Grand Final|
|WATCH: Ferguson given immense ovation on Old Trafford return|
|Three in a row for Lorenzo at Aragon|
|Warner makes 155 on Australian grade cricket return|
|Pain-free Kyrie Irving ready to lead Celtics to NBA title|
|Firmino returns as Shaqiri gets first league start|
|Fulham 1 Watford 1: Mitrovic shines late to spoil Gray´s day|
|Ronaldo vows to lose weight and assist training after Real Valladolid purchase|
|Patriots WR Josh Gordon listed as questionable to face Lions|
|500th goal was crucial to my new book - Ibrahimovic|
|Roosters survive Cronk injury to hold off Souths and reach Grand Final|
|Murray announces intention to end season early|
|I want to play right-back for England - Walker|
|I would beat Bolt for speed on the pitch, claims Traore|
|Ferguson returns to Old Trafford for Manchester United v Wolves|
|Walker ´hurt´ by Pochettino claims over Tottenham exit|
|Douglas Costa has paid his fine for Sassuolo spitting incident – Allegri|
|Djokovic: Sock gave me karma back for hitting Federer|
|Anthony Joshua v Alexander Povetkin: Tale of the tape|
|Wang thrashes Putintseva to win Guangzhou title|
|There is no problem with Cavani - Tuchel silences rumours of PSG rift|
|Wilder & Fury sign contracts for December 1 bout|
|Neymar is the Kim Kardashian of football, claims Barton|
|We did not want to sell him - Perez insists Madrid got ´highest value´ for Ronaldo|
|Osaka continues run, Pliskova awaits in Tokyo final|
|Cardinals keep pace in wildcard race with win over Giants|
|Djokovic hits Federer, pair lose in doubles at Laver Cup|
|Nowitzki likely to come off bench for Mavericks in 21st season|
|Red Wings´ Green battling ´virus that attacked his liver´|
|They said I couldn´t score goals – Ibrahimovic hits back at early critics|
|Slater charged, set to miss Grand Final|
|Rose not changing approach alongside Woods|
|Woods ready to ´hang in there´ at East Lake|
|Shaqiri´s time will come at Liverpool – Klopp|
|Richarlison: I used to copy some of Neymar´s haircuts|
|Brady says Gordon is ´really eager to get in there´ despite limited practice|
|NBA changes clock-reset, ´clear path´ foul rules|
|Tigers´ Martinez will play final game on Saturday before retiring|