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.
|Otavio would trade goal for Porto victory as he bemoans Schalke draw|
|Championship Review: Pacesetters Leeds crush Preston, Villa end five-game winless run|
|Neymar world-class but not a defender - Klopp says Liverpool targeted PSG star|
|Waiters injury update: Heat guard unlikely to be ready for start of season|
|Gojowczyk eliminates returning Tsonga in Metz|
|Liverpool enjoying best start in 57 years after PSG win|
|Galatasaray 3 Lokomotiv Moscow 0: Terim´s side make light work of Russians|
|Club Brugge 0 Borussia Dortmund 1: Super sub Pulisic scores late winner|
|Schalke 1 Porto 1: Fahrmann saves one penalty, but Otavio scores another|
|Red Star Belgrade 0 Napoli 0: Points shared as Italians fail to make possession pay|
|Liverpool 3 Paris Saint-Germain 2: Firmino strikes late as Reds edge five-goal thriller|
|Monaco 1 Atletico Madrid 2: Costa and Gimenez seal comfortable win|
|Chaos reigns in Serie B as league denies suspension claim|
|India secure Asia Cup victory despite valiant Hong Kong effort|
|Messi makes "extraordinary routine", says Valverde after Barca star surpasses Ronaldo|
|Spalletti´s Inter to take heart from Tottenham turnaround|
|Casillas features in landmark 20th Champions League campaign|
|Spurs deserved more from best performance of the season - Pochettino|
|Brown absent from Steelers facility on Monday due to ´personal matter´|
|Toronto´s Bussey given eight-match biting ban|
|Barcelona 4 PSV 0: Marvellous Messi lights up Camp Nou|
|Inter 2 Tottenham 1: Icardi, Vecino complete dramatic late turnaround|
|Allegri, Chiellini defend Costa over spitting ban|
|Firmino only fit enough for bench duty|
|Kovac applauds Sanches ahead of Benfica homecoming|
|Tomlin confirms Steelers WR Brown was absent from facility on Monday|
|Mourinho tells United to follow Federer´s lead amid Young Boys pitch concerns|
|Costa banned for four Serie A matches for spitting|
|PGA Tour announces changes to FedEx Cup Playoffs format|
|Rashford to start against Young Boys, Mourinho confirms|
|Ryder Cup heading to Congressional in 2036|
|I never listen to stupid things - De Gea unconcerned by criticism|
|Aguero trains as Mendy sits out Man City session|
|Lampard fined after accepting improper conduct charge|
|Serie B suspended after Pro Vercelli win appeal|
|Mitchell returns to England as defence coach|
|Brady completes Cornet upset in Guangzhou|
|Lopetegui giving no guarantees to ´fighter´ Navas|
|Di Francesco denies racially abusing Costa|
|Saunders apologises for ´sickening´ online video|
|Tianjin Quanjian 0 Kashima Antlers 3 (0-5 agg): Semi-final spot booked in resounding fashion|
|Madrid cannot live on Ronaldo´s glories, warns Ramos|
|Real Madrid are Champions League favourites, insists Man City coach Arteta|
|Stokes & Hales charged with bringing game into disrepute|
|Stephens slips to Vekic defeat in Tokyo|
|Simeone should teach Griezmann values - Ramos questions Ballon d´Or ambition|
|Arteta ready to step into Guardiola´s shoes after missing out on Arsenal job|
|Naive or scheming - Ozil´s agent slams Kroos, Neuer and Muller|
|Bolton´s Darby forced to retire after Motor Neurone Disease diagnosis|
|Root vows dressing support for Moeen over Ashes abuse claims|
|Madrid more dangerous without Ronaldo - Dani Alves|
|Federer fires ominous Djokovic warning to rivals|
|Arsenal confirm Gazidis departure to Milan|
|Man´s best friend? D´Arcy Short ruled out by dog bite|
|Salah has strong bond with ´friend´ Klopp|
|Mistakes were made in Serena´s US Open row - Federer|
|Burgess wants ´truth to come out´ over lewd video allegations|
|Injury brings premature end to Sharapova´s season|
|The next one´s mine - Griezmann underlines Champions League desire|
|A novice coach and a solar-powered stadium – who are Champions League debutants Young Boys?|
|Free-scoring Liverpool and PSG do battle, Kane eyes elite club - Champions League in Opta numbers|
|Braves fall to Cardinals, still move closer to clinching NL East|
|Mack leads Bears past Seahawks|
|Maradona makes winning start in Mexico|
|Barcelona captaincy has changed Messi, says Bartomeu|
|Lithuania qualify for FIBA World Cup after double-overtime win|
|Yelich makes history with another cycle|
|Silva: PSG, Liverpool have world´s two best attacks|
|It´s like a cow seeing a train – Pochettino uses unusual analogy to talk experience|
|Brady discusses Patriots´ trade for Gordon|