Dhananjaya de Silva hit a maiden century and combined with Dinesh Chandimal to resurrect Sri Lanka's innings after a poor start against Australia on the opening day of the third and final Test on Saturday.
Sri Lanka, who have an unassailable 2-0 lead in the three-match series, won the toss and opted to bat but were reduced to 26 for five, bringing De Silva and Chandimal together at the crease.
For close to the next 74 overs in the day, Australia could not separate the pair as they added 188 for the sixth wicket with the hosts reaching 214 for five at the close, with De Silva 116 not out and Chandimal unbeaten on 64.
Left-arm paceman Mitchell Starc, the most successful bowler in the series, was at his devastating best in the morning and picked up three wickets, taking his tally for the series to 20.
Captain Steve Smith introduced off-spinner Nathan Lyon in the sixth over with the pitch at the Sinhalese Sports Club Ground already providing some assistance to the spinners and was rewarded with two wickets.
Starc, bowling with pace and accuracy, sent back Sri Lanka's faltering opening batsmen, with Kaushal Silva falling for a duck and Dimuth Karunaratne (seven) getting out to the same bowler for all five times in the series.
Kusal Perera (16) hit three boundaries before edging Lyon to Smith at slip while the off-spinner also picked up Sri Lanka captain Angelo Mathews' wicket, the batsman top-edging his sweep shot to deep square leg.
Starc returned for another spell to dismiss in-form Kusal Mendis for one, Smith completing another smart catch behind the wickets.
Lyon thought he had his third when De Silva was given out off a bat-pad catch but the batsman managed to overturn the decision on review.
De Silva, playing only his third Test match, got to his hundred with a boundary off Smith's part-time leg-spin and followed it up with an emotional celebration. He ended the day having hit 16 fours in his 240-ball knock.
Australia had a few half chances but failed to convert them.
Paceman Suranga Lakmal recovered from a hamstring injury to replace Vishwa Fernando in the only change for the hosts from the team that beat Australia by 229 runs in Galle.
Australia, whose top ranking in the format is at stake, dropped opening batsman Joe Burns and number three Usman Khawaja from a side that have struggled against the hosts' spinners.
Left-handed batsman Shaun Marsh and all-rounder Moises Henriques, who last played a test match in March 2013, were drafted in.