A Kaushal Silva century helped Sri Lanka regain control of the third Test against Australia, with the hosts leading by 288 runs remaining going into the final day in Colombo.
Silva's 115, his third Test century, powered the home side to 312-8 on a wicket beginning to demonstrate plenty of turn, meaning Australia can expect a prompt declaration on day five, followed by a battle to survive against the spin that has left them helpless on this tour.
Having already taken an unassailable 2-0 series lead, Angelo Mathews' side made 355 and then bowled Australia out for 379 at Sinhalese Sports Club Ground.
They lost nightwatchman Dilruwan Perera (8) cheaply late on day three, resuming their second innings at 22-1 on Tuesday.
Specialist opener Dimuth Karunaratne (22) failed to build on his start, stumped by Peter Nevill after lifting his back foot attempting to play a fierce Nathan Lyon (4-123) offbreak.
Silva arrived at the crease and proceeded to anchor Sri Lanka's innings, even as partners came and went.
The 30-year-old, playing on his home ground, made a determined 115 from 269 deliveries, reaching the boundary on 10 occasions.
His contributions were crucial to Sri Lanka, as the middle and lower order proved inconsistent in their attempts to convert starts to meaningful scores.
Kusal Perera (24) was out nicking Jon Holland (2-72) to Nevill following a review, while Kusal Mendis (18) was another to get going only to find himself returning to the dressing room, the lbw victim of a plum Mitchell Starc (2-58) delivery.
Skipper Mathews (26) continued that trend, gloving a tasty Lyon ball that pitched well outside off before coming back in sharply to Steve Smith at slip.
Dinesh Chandimal proved a valuable foil to Silva, the pair putting on an innings-high stand of 90 for the sixth wicket before the former went lbw to Lyon for 43, the dismissal given following a review that showed the delivery pitching in line.
Silva's defiant knock finally came to an end eight overs later, a Holland dipper finding the outside edge and Smith doing well to get down low and take the catch.
The tourists' captain was on hand again to remove Rangana Herath for five from the bowling of Lyon.
Suranga Lakmal (0) and Dhananjaya de Silva (44), who had frustrated Australia further still late in the day, remained unbeaten at stumps.