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.
|Gronkowski agent leaves door open for return|
|Wolff braced for Ferrari response in Bahrain|
|WWE, films or partying - What next for Gronkowski following retirement?|
|MLB 2019 preview: Five storylines to watch|
|Banega glad to see Monchi back at Sevilla|
|All Blacks captain Read to make Crusaders return|
|Chelsea transfer ban appeal hearing set for April|
|Argentina expect Messi to do everything - Valdano|
|MLB 2019 preview: Five bold predictions for the upcoming season|
|Brain injury charity questions concussion protocol after Schar injury|
|Phelan hoping to continue dual role with United and Mariners|
|Cooley handed Australia coaching role for Ashes|
|Neymar will inspire like Pele, Zico, Romario - father|
|Joelinton committed to Hoffenheim amid Newcastle, Leipzig links|
|SpongeBob, WWE & dancing in the mirror - The best of retiring Gronkowski´s quotes|
|Neymar in PSG contract talks, says father|
|Schalke and USA midfielder McKennie ruptures ankle ligament|
|Thailand 0 Uruguay 4: Vecino helps seal China Cup title|
|Alisson missing Brazil but feels at home at Liverpool|
|Charnley called up to England performance squad|
|Kante focused on Chelsea amid Madrid links|
|Mourinho: Zidane the right man for Real Madrid|
|Skerritt elected president of Cricket West Indies|
|Nike bow out with patchwork Manchester City ´celebration´ shirt|
|Alli believes England can be the best in the world|
|Curry: Surreal that Warriors have won 50 games again|
|LeBron won´t ´cheat the game´ even with Lakers out of playoff contention|
|Inter play better with Lautaro, says Pirlo|
|Zorc knows nothing of United interest in Sancho|
|Not in a million years! - Hornets´ Lamb in disbelief over game-winner|
|Sterling has qualities to be England captain - Southgate|
|Morocco frustrated by Messi´s friendly absence|
|The Australia ball-tampering scandal one year on: Have the batsmen filled the Smith-Warner void?|
|Giants owner: Beckham trade left grandsons crying|
|McGee explains Lakers´ mentality after playoff elimination|
|Emotional Trout addresses Angels team-mates, fans for first time since signing extension|
|Peterson retires after loss to Lipinets|
|Kyrgios continues Miami run, Djokovic battles through|
|Kyrgios produces two underarm serves in Lajovic thrashing|
|Aldridge powers Spurs over Celtics to continue hot streak|
|Leading tight end and Super Bowl star – the numbers behind Gronkowski´s greatness|
|Stephens´ struggles continue as Halep, Pliskova reach last 16|
|Duke´s Williamson discusses win over UCF, matchup with Fall|
|Low ´very satisfied´ after win over Netherlands|
|WATCH: Hornets´ Lamb hits incredible game-winner from beyond half-court|
|Belichick praises Gronkowski: He was a major reason why we won championships|
|Taumalolo out for up to 10 weeks in blow to Cowboys|
|Keselowski dominates field, secures STP 500 win|
|Duke hold off UCF in thriller|
|O´Sullivan returns to world number one after nine years|
|NFL players congratulate Gronkowski after retirement announcement|
|Koeman accepts responsibility for Germany loss|
|Djokovic overcomes Delbonis in Miami|
|Southgate: Sancho, Alli, Henderson doubts for Montenegro-England|
|Gronkowski the GOAT – Brady reacts to Patriots star´s retirement|
|Toulouse beat La Rochelle to extend lead, Racing see off Bordeaux|
|Martinez commends ´mature´ Belgium display against Cyprus|
|Casey retains Valspar Championship|
|De Ligt: Netherlands were scared to attack Germany|
|Matchwinner Magennis hails Northern Ireland´s team spirit|
|Germany still have work to do despite dramatic Dutch win, says Low|
|New England Revolution 0 FC Cincinnati 2: Saief-inspired visitors up to second|
|Steelers GM says Roethlisberger deal will ´probably´ be his last|
|Patriots star Gronkowski retires|
|Northern Ireland 2 Belarus 1: Magennis sends O´Neill´s men top of Group C|
|Netherlands 2 Germany 3: Late Schulz strike settles Group C classic|
|Cyprus 0 Belgium 2: Hazard marks 100th cap with a goal in easy win|
|Dislocated shoulder rules Richardson out of Australia-Pakistan ODI series|
|Maradona slams players and ´inept´ AFA president Tapia after Venezuela defeat|
|Deschamps not worried about latest Coman injury|