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.
|Tebow: I told Murray to follow his heart|
|Mourinho created unhealthy atmosphere – Sanchez|
|Santa Cruz defends belt against Rivera|
|Opelka, Isner set ATP Tour record at New York Open|
|Diallo soars over Shaq to win Slam Dunk contest|
|WATCH: Diallo dunks over Shaquille O´Neal|
|Silver: NBA trade requests should stay behind closed doors|
|´It´s more of an aspiration´ – LeBron clears up potential NBA ownership|
|Harris wins Three-Point contest ahead of Curry|
|Thomas leads rain-delayed Genesis Open|
|Tatum wins NBA Skills Challenge with stunning half-court shot|
|Robben: Anfield is the worst stadium|
|Valverde not nervous about Messi penalties after spot-kick miss|
|Sanchez ´worried´ amid Man United struggles|
|Schoeman hat-trick sees Lions past Jaguares|
|Piatek lives to score goals - Milan striker´s brilliant double pleases Gattuso|
|Lyon will punish Barca in this form, Pique warns|
|Guardiola lauds Silva´s ´incredible´ FA Cup performance|
|Clermont hit the top, Perpignan finally win|
|Schwartzman saves match point to down Thiem in Buenos Aires|
|Leinster withstand Zebre test as Connacht claim big win|
|Antonio Brown: Roethlisberger has owner mentality and you can´t call him out|
|Pizarro becomes Bundesliga´s oldest ever goalscorer|
|Wawrinka ends 20-month wait for final to book Monfils showdown|
|Barcelona 1 Real Valladolid 0: Hit and miss as Messi gets job done|
|Atalanta 1 AC Milan 3: Two-goal Piatek lands blow in fight for fourth|
|NBA, FIBA link up to start 12-team league in Africa|
|Guardiola proud of ´incredible´ City after Newport win|
|Worst pitch I´ve played on - Manchester City hero Foden unimpressed with Newport surface|
|LeBron James, Derek Jeter lead praise for retiring Yankees legend CC Sabathia|
|Durant happy for Porzingis but guarded on his own future|
|Newport County 1 Manchester City 4: Foden nets brace as upset is averted|
|Simeone plans Griezmann, Costa, Morata trident|
|Stephen Curry reveals three-point contest bet with brother Seth|
|Celtics, Lakers, Knicks on Anthony Davis´ list, along with 26 others|
|Mertens fights back to defeat Halep for her biggest WTA title|
|Championship Review: Norwich hit four as Baggies & Blades cruise|
|Sala mourned at funeral in Argentina|
|Costa thrilled to make Atletico return at old club Rayo|
|Specman´s spectacular debut double leads Bulls in Stormers thrashing|
|Sarries pounce on Chiefs slip as Saints sink sorry Sharks|
|Griezmann overtakes Torres on Atletico Madrid´s top-scorer list|
|LeBron James reacts to Kaepernick´s settlement with NFL: I´m happy he won his suit|
|Giannis to play for Greece at FIBA Basketball World Cup|
|Next question! - Russell Westbrook on All-Star Game team-mate Joel Embiid|
|Rayo Vallecano 0 Atletico Madrid 1: Griezmann downs derby rivals again|
|McIlroy on the charge as Tiger scrambles to make cut at Genesis Open|
|AFC Wimbledon 0 Millwall 1: Wallace knocks out West Ham conquerors|
|Lille star Leao dismisses Mbappe comparisons|
|Hamilton, Federer and Maradona send MotoGP great Rossi birthday wishes|
|Du Plessis applauds ´Superman´ Perera effort|
|Big Bash League: The best Opta facts ahead of Melbourne derby final|
|Farbrace stepping down as England assistant to take Warwickshire role|
|Spalletti hopes culprit is punished after reported attack on Icardi´s agent´s car|
|Tuchel wary of mounting PSG injury problems|
|Sangakkara, Jayawardene lead tributes to Kusal´s stunning Sri Lanka knock|
|Windies call up trio as injury replacements|
|Brighton and Hove Albion 2 Derby County 1: Knockaert strikes as Seagulls reach last eight|
|I did my part, says modest Sri Lanka match-winner Perera|
|Costa returns to Atletico Madrid squad|
|A-League Review: Perth Glory nine points clear after record defeat of Brisbane Roar|
|Ramos was asked a trick question - Solari|
|Crusaders begin with a win, Hurricanes leave it late|
|Sensational Kusal Perera inspires record-breaking Sri Lanka victory|
|Madrid´s old heads are helping Vinicius, says Solari|
|Ospina eyes South America switch as Napoli back Meret|
|I would want to be Anthony Davis, says Lakers great Abdul-Jabbar|
|Ribery future up in the air, says Bayern CEO Rummenigge|
|Smith and Warner will walk back into Australia team, says Clarke|
|Ferguson to manage Manchester United in ´Treble Reunion´ match|