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.
|Kaymer: Home-course advantage crucial to Europe hopes|
|Marta and Pedros win FIFA Best awards|
|I want to be in Toronto - Kawhi Leonard focused on Raptors, not future|
|Messi and Ronaldo lead FIFPro World XI as Salah and Neymar miss out|
|Knicks´ Kristaps Porzingis ´itchy´ to return but won´t commit to 2018-19 season|
|Modric beats Ronaldo and Salah to FIFA Best prize|
|49ers confirm ACL tear for QB Garoppolo|
|Salah beats Bale and Ronaldo to Puskas Award|
|Deschamps wins FIFA Best Men´s Coach award|
|Law to leave Windies for Middlesex role|
|Sunderland terminate Ndong´s contract|
|Spalletti warns rejuvenated Inter against complacency|
|Ryder Cup 2018: Figo in town as USA arrive in style|
|Browns name Baker Mayfield starting QB|
|Chelsea need to be more versatile, warns Giroud|
|Paris Saint-Germain FFP case referred by UEFA back to CFCB Investigatory Chamber|
|Busy Bertens ready for bed, Muguruza gains Wimbledon revenge|
|Hart ready if England come calling - Dyche|
|Ryder Cup 2018: An honour and a burden - the unique challenge of captaincy|
|Hibino beats Bouchard again at the Tashkent Open|
|Falcons lose Ricardo Allen for season|
|Mbappe three-match ban stands following appeal|
|Tomic wins first Tour-level match since Wimbledon in Chengdu|
|Ryder Cup diary: Scoreboard shocker, captains tight-lipped|
|Mourinho will spawn lots of managers - Lampard|
|Furyk outlines Woods´ Ryder Cup motivation|
|Tiger doesn´t scare Team Europe - Bjorn|
|Ryder Cup 2018: Team USA profile|
|Woods winning ´incredibly special for golf´, says Poulter|
|Grealish commits to Aston Villa with five-year deal|
|Ryder Cup 2018: Four reasons why Team USA will win|
|Herrera ready for return - Mourinho|
|Bellew determined to prove doubters wrong against Usyk|
|Lewandowski and Boateng´s professionalism impresses Kovac|
|WATCH: Sheepish Murray comically drops commemorative plate in China|
|Cech: Arsenal have forgotten how to win Premier League titles|
|Lemar must adapt to Atleti style, says Simeone|
|Toulon to appeal suspended points penalty|
|AFE rejects Miami plan for Girona-Barca|
|Messi and Ronaldo to decide world´s best young player|
|Ryder Cup 2018: Talisman Poulter key to European hopes|
|Pogba hits out at critics who ´create drama´|
|Barcelona to appeal Lenglet red card|
|Ryder Cup 2018: Team Europe profile|
|Patriots´ Gronkowski threatened to retire if traded to Lions|
|Ryder Cup 2018: Four reasons why Europe will win|
|Tigres and Monterrey condemn violence that leaves fan in intensive care|
|Williams baffled by coach´s claim he sent her US Open final signals|
|Ryder Cup 2018: A sporting spectacular you cannot afford to miss|
|Cricket Australia closes investigation into Moeen claim|
|Zlatan impressed by ´MVP´ singer|
|Modric hoping to complete FIFA and UEFA double at Best Awards|
|Mickelson never doubted Woods would win again|
|Woods looked like Tiger of old in 80th PGA Tour win|
|Chelsea were too slow against West Ham - David Luiz|
|Tottenham star Kane acknowledges sub-par start|
|Rashid signs one-year all-format deal with Yorkshire|
|Brady and Patriots crash to back-to-back defeats|
|Gundogan looking forward to ´real test´ against Liverpool|
|Cubs move closer to clinching NL Central|
|Valverde bewildered by Lenglet red card as Barca boss questions VAR|
|Cronk a ´long shot´ to play in NRL Grand Final|
|Cleary re-signs with Panthers until 2024|
|Bills stun Vikings, Chiefs QB Mahomes impresses again|
|Tiger feels he can surpass Snead´s record after 80th victory|
|Ronaldo mentally stronger than others, says Allegri|
|MLS Review: Ibrahimovic scores as Galaxy end seven-game skid, Dallas reclaim top spot in west|
|Rose told Woods it was ´about time´ after win|
|Dustin Johnson regains number one ranking|
|Pogba: Sanchez will deliver at Man United|