Smith and Marsh put on a record 246 runs for the second wicket, raising Australian hopes of building a match-winning lead in response to Sri Lanka's first innings total of 355 before the veteran Herath put the brakes on with a six wicket haul.
Australia were eventually all out for 379, a lead which was reduced to just two runs by the close of play as Sri Lanka reached 22 at stumps, albeit with the loss of opener Dilruwan Perera who was lbw to Mitchell Starc for eight.
Herath -- who took a hat-trick in the last Test and 10 wickets in the first match of the series -- again brought the hosts back into contention by taking six for 81.
The 38-year-old veteran ran through the Australian tail with help from fellow spinner Dilruwan Perera's two wickets.
Medium-pacer Suranga Lakmal struck with the second new ball in the second session to get the wicket of Marsh and break the dangerous partnership.
Smith, who hit 10 fours and a six during his 119-run knock, departed after being stumped off Herath, with the third umpire ruling in favour of the bowler in a close decision.
The marathon partnership between Smith and Marsh was the highest second-wicket stand between the two countries.
The pair ensured that Australia did not lose a wicket in the first session as the visitors took lunch on 235 for one.
Marsh, who was drafted into the Australia side because of his long experience of Asian conditions, survived a dropped catch on 67 early in the morning against Herath but soon took control.
Smith, who resumed the day on 61, reached his 15th Test century to improve on his previous best of 55 in the series.
Mitchell Marsh, who registered his second Test half-century, contributed a useful 53 to help Australia surpass Sri Lanka's first innings score.
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
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
