South Africa paceman Kagiso Rabada led an inspired bowling attack to put Sri Lanka in trouble at 161 for six on day one of the opening Test in Galle on Thursday.
Opener Dimuth Karunaratne, the most comfortable of Sri Lanka's batsmen, was not out 80 off 132 balls when rain stopped play in the second session, forcing the umpires to call for early tea.
Rabada, who has figures of 3-35 from his nine overs, tore through the Sri Lankan middle-order after lunch as the islanders slipped from 115-2 to 119-5.
The hosts had elected to bat first at the start of the two-match series.
Left-arm wrist spinner Tabraiz Shamsi made an impact in just his second Test with two crucial wickets to hurt Sri Lanka, who had taken lunch at 93-2.
Shamsi added to his morning's wicket tally, having Niroshan Dickwella caught at slip for 18, just before rain interrupted play.
The wicket of Dickwella ended a 32-run stand, which was Sri Lanka's best partnership of the session.
He had earlier bowled Dhananjaya de Silva before lunch on a surface that was already offering significant turn.
Karunaratne, who completed his 15th Test half-century early in the afternoon session, has kept alive Sri Lanka's hopes of posting a respectable total.
Although he had his edge repeatedly beaten by Shamsi, Karunaratne survived Rabada's fearsome four-over spell.
Veteran quick Dale Steyn had set Sri Lanka's post-lunch slump in motion, having Kusal Mendis caught at mid-on for 24.