Smith and Marsh put together an unbroken 214-run partnership for the second wicket to strengthen Australia's first innings reply against Sri Lanka's 355. The visitors still trailed the hosts by 120 runs.
The left-handed Marsh, whose innings was laced with 16 boundaries, was on 110 while Smith, who has hit nine boundaries and a six, was on 104 at the break.
Marsh, who started the day on 64, recorded his fourth Test century and second in Sri Lanka.
He brought up his hundred with an inside edge off Dilruwan Perera that went for a boundary and he celebrated the milestone by hugging his skipper at the other end.
Also Read
Smith and Marsh used their feet to good effect to blunt the spinners, forcing Sri Lankan skipper Angelo Mathews to keep rotating his bowling options at the Sinhalese Sports Club.
Chandimal, who scored 132 and De Silva, who scored his maiden test ton, put together a remarkable fightback with a 211-run sixth wicket partnership.
Australian pace spearhead Mitchell Starc took five wickets with support from off-spinner Nathan Lyon who got two.
Top-ranked Australia are bidding to avoid a series whitewash after losing the first two Tests.
Disclaimer: No Business Standard Journalist was involved in creation of this content